From d4cecf1ee37f6b611ef092c9c7fa3761d02ce2c3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 4 Apr 2012 13:32:15 +0200 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ lib/regex.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2f8eb0f75..d41141cf8 100644 --- 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 index a8e2341ca..ab27536c8 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -19,8 +19,10 @@ #ifndef _LIBC # include -# if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ +# 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 "-Wtype-limits" # endif #endif -- 2.11.0