This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/3] Add DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION


On 06/04/2018 01:13 PM, Nick Clifton wrote:
> Hi H.J.
> 
>> +# if __GNUC__ == 8 && __GNUC_MINOR__ < 2
>> +#  define DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION \
>> +  DIAGNOSTIC_IGNORE ("-Wstringop-truncation")
>> +# endif
>>
>> OK for master?
> 
> Approved - please apply.

Please don't.  This is again going against the intention of
the header.  The GCC version checks should be put in the
places where the warning needs to be suppressed.
The current patch makes all current and future uses of
DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION only apply to
GCC 8.1.  That is incorrect.  Consider what you will
have to do to suppress some -Wstrinop-truncation warning
with DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION on GCC 8.2 or
GCC 9 or whatever.

Also, you can use GCC_VERSION to make the version check
a little simpler.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]