This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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 Mon, Jun 4, 2018 at 5:19 AM, Pedro Alves <palves@redhat.com> wrote:
> 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.

This is what my original patch intended to do.  But diagnostics.h from
GDB doesn't support GCC version.   Should I extend it to match glibc?

> Also, you can use GCC_VERSION to make the version check
> a little simpler.
>
> Thanks,
> Pedro Alves



-- 
H.J.


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