From: Jim Meyering Date: Tue, 29 Nov 2011 09:09:41 +0000 (+0100) Subject: quotearg, propername: correct pragma guard expression X-Git-Tag: v0.1~1395 X-Git-Url: https://erislabs.net/gitweb/?p=gnulib.git;a=commitdiff_plain;h=2ae12d77e599965beb1483c10edb1f2f290bafc1 quotearg, propername: correct pragma guard expression * lib/quotearg.c: Enable pragma for gcc-4.6 and newer, not 4.3 and newer. * lib/propername.c: Likewise. Reported by Bernhard Voelker. --- diff --git a/ChangeLog b/ChangeLog index 28fbe90a8..dddd33380 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-11-29 Jim Meyering + + quotearg, propername: correct pragma guard expression + * lib/quotearg.c: Enable pragma for gcc-4.6 and newer, not 4.3 and newer. + * lib/propername.c: Likewise. Reported by Bernhard Voelker. + 2011-11-28 Jim Meyering propername: do not mark proper_name with the const attribute diff --git a/lib/propername.c b/lib/propername.c index 346c31048..31fc96a80 100644 --- a/lib/propername.c +++ b/lib/propername.c @@ -17,7 +17,7 @@ /* Without this pragma, gcc 4.7.0 20111124 mistakenly suggests that the proper_name function might be candidate for attribute 'const' */ -#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ +#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wsuggest-attribute=const" #endif diff --git a/lib/quotearg.c b/lib/quotearg.c index 3c154117d..03fbfe797 100644 --- a/lib/quotearg.c +++ b/lib/quotearg.c @@ -20,7 +20,7 @@ /* Without this pragma, gcc 4.7.0 20111124 mistakenly suggests that the quoting_options_from_style function might be candidate for attribute 'pure' */ -#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ +#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" #endif