changeset 16771:31fd5d8301d0

regex: correct #pragma guard expression * lib/regex.c: -Wsuggest-attribute=pure was introduced in gcc-4.6, not 4.3. Correct its cpp guard expression.
author Jim Meyering <meyering@redhat.com>
date Wed, 04 Apr 2012 13:32:15 +0200
parents e011e0a7ab5a
children 2b2fd4336211
files ChangeLog lib/regex.c
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-04  Jim Meyering  <meyering@redhat.com>
+
+	regex: correct #pragma guard expression
+	* lib/regex.c: -Wsuggest-attribute=pure was introduced in gcc-4.6,
+	not 4.3.  Correct its cpp guard expression.
+
 2012-04-04  Paul Eggert  <eggert@cs.ucla.edu>
 
 	regex: remove unnecessary type punning
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -19,8 +19,10 @@
 #ifndef _LIBC
 # include <config.h>
 
+# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+#  pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+# endif
 # if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
-#  pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
 #  pragma GCC diagnostic ignored "-Wtype-limits"
 # endif
 #endif