This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Use DIAG_IGNORE_NEEDS_COMMENT to silence -Wstringop-truncation
On 05/16/2018 09:54 PM, Alan Modra wrote:
> On Mon, May 14, 2018 at 10:09:53PM -0400, Carlos O'Donell wrote:
>> On 05/07/2018 11:32 PM, Alan Modra wrote:
>>> Also, not all binutils users have glibc installed. We can't depend on
>>> a macro defined in glibc's /usr/include/features.h, __GNUC_PREREQ.
>>
>> Just to be clear the patch doesn't depend on glibc being installed, it
>> just copies the presently used macros from glibc for use in binutils.
>>
>> ... and then uses them to fix the gcc 8 issues that crop up with -Werror.
>
> I checked HJ's patch again, and stand by my comment about
> __GNUC_PREREQ. This macro is not defined anywhere in the binutils
> sources, nor is it defined by HJ's patch.
My apologies, I misread your original statement. I completely agree.
Why do we need __GNUC_PREREQ macro?
You can unconditionally use the DIAG_* macros, and if you're
__GNUC__ >= 8 then they evaluate to meaningful things, otherwise
nothing.
--
Cheers,
Carlos.