# HG changeset patch # User Jim Meyering # Date 1333539135 -7200 # Node ID 31fd5d8301d00009eb5a509c65203f5a10cda8ad # Parent e011e0a7ab5ab704fbf134bd212451b49cbc849d 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. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-04-04 Jim Meyering + + 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 regex: remove unnecessary type punning diff --git a/lib/regex.c b/lib/regex.c --- a/lib/regex.c +++ b/lib/regex.c @@ -19,8 +19,10 @@ #ifndef _LIBC # include +# 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