Bernhard Voelker wrote: > Since gnulib commit 69f517e5975418e7b2c5033f8f60191919f44b9d, > a coreutils build fails when --enable-gcc-warnings is enabled: > > CC propername.o > cc1: warnings being treated as errors > propername.c:21:10: error: unknown option after '#pragma GCC > diagnostic' kind [-Wpragmas] > > The same applies to quotearg.c:24:10 (since > 9e62d63e086644da90db03c16907e5c7bb5a42cb).
Thanks for the report. Fixed like this in gnulib. I'll pull the latest gnulib into coreutils later today. >From 2ae12d77e599965beb1483c10edb1f2f290bafc1 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Tue, 29 Nov 2011 10:09:41 +0100 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ lib/propername.c | 2 +- lib/quotearg.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28fbe90..dddd333 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-11-29 Jim Meyering <meyer...@redhat.com> + + 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 <meyer...@redhat.com> propername: do not mark proper_name with the const attribute diff --git a/lib/propername.c b/lib/propername.c index 346c310..31fc96a 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 3c15411..03fbfe7 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 -- 1.7.8.rc3.31.g017d1