bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new extern inline provokes -Wmissing-declarations warnings


From: Jim Meyering
Subject: Re: new extern inline provokes -Wmissing-declarations warnings
Date: Sun, 05 Aug 2012 18:36:57 +0200

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:"

>     #  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]