bug-gnulib
[Top][All Lists]
Advanced

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

Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-paramete


From: Tim Rühsen
Subject: Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression]
Date: Wed, 3 Jan 2018 16:19:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 01/03/2018 04:07 PM, Eric Blake wrote:
> On 01/03/2018 04:53 AM, Tim Rühsen wrote:
>> ... here is another one in lib/cdef.h occurring with a  MinGW build.
>>
>>
>> In file included from ../lib/libc-config.h:149:0,
>>                  from ../lib/glob.h:24,
>>                  from utils.c:35:
>> ../lib/cdefs.h:298:6: warning: "__USE_FORTIFY_LEVEL" is not defined,
>> evaluates to 0 [-Wundef]
>>  # if __USE_FORTIFY_LEVEL > 0
>>       ^~~~~~~~~~~~~~~~~~~
>>
> 
> How come it doesn't trigger a warning in lib/stdio.in.h?  At any rate,
> -Wundef is slightly different than -Wunused-parameter, but I _do_ see
> cases where we have catered to it in .h files:
> 
> lib/cdefs.h:#if defined __GNUC__ && __GNUC__ >= 2
> lib/file-set.h:#if defined __GNUC__ && ((__GNUC__ == 3 && __GNUC_MINOR__
>> = 3) || __GNUC__ > 3)
> lib/gettext.h:#if defined ENABLE_NLS && ENABLE_NLS
> lib/obstack.h:# if !defined __GNUC_MINOR__ || __GNUC__ * 1000 +
> __GNUC_MINOR__ < 2008
> 
> and since cdefs.h is in that group, feel free to submit a patch to have
> the use of __USE_FORTIFY_LEVEL pacify -Wundef.

There was a patch attached to email...

Since lib/stdio.in.h doesn't trigger here I am unsure if I should patch
it as well.

Regards, Tim

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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