diff options
author | Chad Loder <cloder@cvs.openbsd.org> | 2005-12-18 19:21:03 +0000 |
---|---|---|
committer | Chad Loder <cloder@cvs.openbsd.org> | 2005-12-18 19:21:03 +0000 |
commit | 693fa5b3c9455ce2ea326b863467141624b6bb30 (patch) | |
tree | 3643612105f92036b06c267c9fdb0e99d78f9c65 /usr.bin/xlint/lint1 | |
parent | be867aeba5c85a6bc44ddbc30e8123c2991a0774 (diff) |
Grok NORETURN function prototypes in addition to NORETURN function
definitions.
Diffstat (limited to 'usr.bin/xlint/lint1')
-rw-r--r-- | usr.bin/xlint/lint1/decl.c | 10 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/externs1.h | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/usr.bin/xlint/lint1/decl.c b/usr.bin/xlint/lint1/decl.c index dd5d3a92f59..ff017b9deb0 100644 --- a/usr.bin/xlint/lint1/decl.c +++ b/usr.bin/xlint/lint1/decl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: decl.c,v 1.18 2005/12/10 18:51:54 martin Exp $ */ +/* $OpenBSD: decl.c,v 1.19 2005/12/18 19:21:02 cloder Exp $ */ /* $NetBSD: decl.c,v 1.11 1995/10/02 17:34:16 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: decl.c,v 1.18 2005/12/10 18:51:54 martin Exp $"; +static char rcsid[] = "$OpenBSD: decl.c,v 1.19 2005/12/18 19:21:02 cloder Exp $"; #endif #include <sys/param.h> @@ -1790,6 +1790,12 @@ decl1ext(sym_t *dsym, int initflg) } } + if (dsym->s_type->t_tspec == FUNC) { + if (noretflg) + dsym->s_noreturn = 1; + } + noretflg = 0; + /* Write the declaration into the output file */ if (plibflg && llibflg && dsym->s_type->t_tspec == FUNC && dsym->s_type->t_proto) { diff --git a/usr.bin/xlint/lint1/externs1.h b/usr.bin/xlint/lint1/externs1.h index 4bbabf1a30c..003e926f1c9 100644 --- a/usr.bin/xlint/lint1/externs1.h +++ b/usr.bin/xlint/lint1/externs1.h @@ -1,4 +1,4 @@ -/* $OpenBSD: externs1.h,v 1.9 2005/12/17 21:08:27 cloder Exp $ */ +/* $OpenBSD: externs1.h,v 1.10 2005/12/18 19:21:02 cloder Exp $ */ /* $NetBSD: externs1.h,v 1.7 1995/10/02 17:31:39 jpo Exp $ */ /* @@ -225,6 +225,7 @@ extern pos_t scflpos; extern int ccflg; extern int llibflg; extern int nowarn; +extern int noretflg; extern int plibflg; extern int quadflg; |