summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-02-26 11:28:37 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2012-02-29 00:28:40 -0800
commit3732fd2b98692a1e58fa7254fc0cacab8136fb11 (patch)
tree5ac9d9cef61c8df254ceb9518108fe9991a21fe9 /src
parent23c3e9cc24c7b20b55e3fa67c4d1fd599abc6e1a (diff)
downloadgrep-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.h6
-rw-r--r--src/grep.h4
-rw-r--r--src/main.c2
3 files changed, 2 insertions, 10 deletions
diff --git a/src/dfa.h b/src/dfa.h
index 17a47786..351a4707 100644
--- a/src/dfa.h
+++ b/src/dfa.h
@@ -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 *);
diff --git a/src/grep.h b/src/grep.h
index 744a8892..f5ab8bfc 100644
--- a/src/grep.h
+++ b/src/grep.h
@@ -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 *);
diff --git a/src/main.c b/src/main.c
index e5938715..6151cacf 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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)
{