Make the GCC-specific __dead2 markers conditional on whether

we're compiling under GCC.
This commit is contained in:
Tim Kientzle 2008-12-06 07:15:42 +00:00
parent dff5b8bc1f
commit 5eca8160b5
2 changed files with 9 additions and 1 deletions

View File

@ -89,7 +89,7 @@ struct cpio {
/* Name of this program; used in error reporting, initialized in main(). */
const char *cpio_progname;
void cpio_errc(int _eval, int _code, const char *fmt, ...) __dead2;
void cpio_errc(int _eval, int _code, const char *fmt, ...) __LA_DEAD;
void cpio_warnc(int _code, const char *fmt, ...);
int owner_parse(const char *, int *, int *);

View File

@ -81,4 +81,12 @@
#endif
#endif
/* How to mark functions that don't return. */
#if defined(__GNUC__) && (__GNUC__ > 2 || \
(__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
#define __LA_DEAD __attribute__((__noreturn__))
#else
#define __LA_DEAD
#endif
#endif /* !CPIO_PLATFORM_H_INCLUDED */