[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
__attribute__((__noreturn__)) for Bison functions that don't return
From: |
Paul Eggert |
Subject: |
__attribute__((__noreturn__)) for Bison functions that don't return |
Date: |
Mon, 21 Oct 2002 22:13:33 -0700 (PDT) |
2002-10-21 Paul Eggert <address@hidden>
* src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
* src/getargs.c (usage): Likewise.
Index: src/complain.h
===================================================================
RCS file: /cvsroot/bison/bison/src/complain.h,v
retrieving revision 1.10
diff -p -u -r1.10 complain.h
--- src/complain.h 21 Oct 2002 05:28:34 -0000 1.10
+++ src/complain.h 22 Oct 2002 04:31:40 -0000
@@ -44,19 +44,19 @@ void complain_at (location_t location, c
/* Something bad happen and we die now. */
void fatal (const char *format, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
+ __attribute__ ((__noreturn__, __format__ (__printf__, 1, 2)));
void fatal_at (location_t location, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
+ __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
/* Position in the current input file. */
extern char *infile;
/* This variable is set each time `warn' is called. */
extern bool warning_issued;
/* This variable is set each time `complain' is called. */
extern bool complaint_issued;
# ifdef __cplusplus
}
Index: src/getargs.c
===================================================================
RCS file: /cvsroot/bison/bison/src/getargs.c,v
retrieving revision 1.44
diff -p -u -r1.44 getargs.c
--- src/getargs.c 21 Oct 2002 18:15:13 -0000 1.44
+++ src/getargs.c 22 Oct 2002 04:31:40 -0000
@@ -155,6 +155,8 @@ report_argmatch (char *args)
| Display the help message and exit STATUS. |
`-------------------------------------------*/
+static void usage (int) ATTRIBUTE_NORETURN;
+
static void
usage (int status)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- __attribute__((__noreturn__)) for Bison functions that don't return,
Paul Eggert <=