Jim Meyering wrote: > Jim Meyering wrote: > >> Jim Meyering wrote: >> >>> Paul Eggert wrote: >>>> On 08/05/2012 06:27 AM, Jim Meyering wrote: >>>> >>>>> * configure.ac: Disable -Wmissing-declarations to avoid warnings >>>>> from gnulib's newly extern-inline functions. >>>> >>>> This shouldn't be needed if your compiler is sufficiently >>>> new, because timespec.h's _GL_INLINE_HEADER_BEGIN >>>> is supposed to suppress those warnings. If you're using >>>> GCC 4.7.1 or later, could you please figure out what the issue >>> >>> I'm using 2-day-old gcc 4.8.0 20120803 >>> >>>> is? If it's an older GCC, I wouldn't worry about it -- people >>>> aren't supposed to use --enable-gcc-warnings unless >>>> they have a sufficiently-new GCC. >>> >>> Oh, that handles -Wmissing-prototypes, >>> >>> # define _GL_INLINE_HEADER_BEGIN \ >>> _Pragma ("GCC diagnostic push") \ >>> _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") >>> # define _GL_INLINE_HEADER_END \ >>> _Pragma ("GCC diagnostic pop") >>> # endif >>> >>> while this problem is with -Wmissing-declarations. >> >> Forgot to say, "maybe the solution is as simple as this:" > > With one more backslash, too: > > # define _GL_INLINE_HEADER_BEGIN \ > _Pragma ("GCC diagnostic push") \ > _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ > _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") > # define _GL_INLINE_HEADER_END \ > _Pragma ("GCC diagnostic pop") > # endif
Yep, that does the trick. Thanks for the tip. With that, I can now drop the coreutils commit. >From b856f3ae3cd7b3a501a2e8be37ee86e7f58cb12b Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Sun, 5 Aug 2012 18:41:53 +0200 Subject: [PATCH] extern-inline: also ignore -Wmissing-declarations * m4/extern-inline.m4: Also ignore -Wmissing-declarations, required with gcc-4.8.0-to-be. --- ChangeLog | 4 ++++ m4/extern-inline.m4 | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index efa1179..774cdb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-08-05 Jim Meyering <meyer...@redhat.com> + extern-inline: also ignore -Wmissing-declarations + * m4/extern-inline.m4: Also ignore -Wmissing-declarations, + required with gcc-4.8.0-to-be. + maint.mk: sc_prohibit_magic_number_exit: avoid new false positives * top/maint.mk (sc_prohibit_magic_number_exit): Also filter out matches for /error ?([^,]*)/. This avoids false-positives for strings like diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 index cacf8a0..187a335 100644 --- a/m4/extern-inline.m4 +++ b/m4/extern-inline.m4 @@ -24,7 +24,8 @@ AC_DEFUN([gl_EXTERN_INLINE], # if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ # define _GL_INLINE_HEADER_BEGIN \ _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") # define _GL_INLINE_HEADER_END \ _Pragma ("GCC diagnostic pop") # endif -- 1.7.12.rc1.10.g97c7934