diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-02-26 11:28:37 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-02-29 00:28:40 -0800 |
commit | 3732fd2b98692a1e58fa7254fc0cacab8136fb11 (patch) | |
tree | 5ac9d9cef61c8df254ceb9518108fe9991a21fe9 /src | |
parent | 23c3e9cc24c7b20b55e3fa67c4d1fd599abc6e1a (diff) | |
download | grep-3732fd2b98692a1e58fa7254fc0cacab8136fb11.tar.gz |
maint: use gnulib _Noreturn rather than __attribute__ ((noreturn))
* src/grep.h (__attribute__): Remove.
* src/dfa.h (__attribute__): Likewise.
(dfaerror): Use noreturn rather than __attribute__ ((noreturn)).
* src/main.c (usage): Likewise.
Diffstat (limited to 'src')
-rw-r--r-- | src/dfa.h | 6 | ||||
-rw-r--r-- | src/grep.h | 4 | ||||
-rw-r--r-- | src/main.c | 2 |
3 files changed, 2 insertions, 10 deletions
@@ -18,10 +18,6 @@ /* Written June, 1988 by Mike Haertel */ -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__ -# define __attribute__(x) -#endif - /* Element of a list of strings, at least one of which is known to appear in any R.E. matching the DFA. */ struct dfamust @@ -99,4 +95,4 @@ extern void dfawarn (const char *); /* dfaerror() is called by the regexp routines whenever an error occurs. It takes a single argument, a NUL-terminated string describing the error. The user must supply a dfaerror. */ -extern void dfaerror (const char *) __attribute__ ((noreturn)); +extern _Noreturn void dfaerror (const char *); @@ -20,10 +20,6 @@ #ifndef GREP_GREP_H #define GREP_GREP_H 1 -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__ -# define __attribute__(x) -#endif - /* Function pointer types. */ typedef void (*compile_fp_t) (char const *, size_t); typedef size_t (*execute_fp_t) (char const *, size_t, size_t *, char const *); @@ -1432,7 +1432,7 @@ grepdir (char const *dir, struct stats const *stats) return status; } -void usage (int status) __attribute__ ((noreturn)); +_Noreturn void usage (int); void usage (int status) { |