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/decl.c | |
parent | be867aeba5c85a6bc44ddbc30e8123c2991a0774 (diff) |
Grok NORETURN function prototypes in addition to NORETURN function
definitions.
Diffstat (limited to 'usr.bin/xlint/lint1/decl.c')
-rw-r--r-- | usr.bin/xlint/lint1/decl.c | 10 |
1 files changed, 8 insertions, 2 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) { |