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
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Carlos O'Donell <carlos at redhat dot com>, binutils at sourceware dot org
- Date: Tue, 8 May 2018 13:02:36 +0930
- Subject: Re: [PATCH] Use DIAG_IGNORE_NEEDS_COMMENT to silence -Wstringop-truncation
- References: <20180423084836.GA18288@bubble.grove.modra.org> <e921f6bf-bd10-a411-a3fb-d1421ceb4911@redhat.com> <20180426024324.GK18288@bubble.grove.modra.org> <bb94578c-f8ce-6fc8-c308-6154b77c0b2e@redhat.com> <20180507134315.GA27623@gmail.com>
On Mon, May 07, 2018 at 06:43:15AM -0700, H.J. Lu wrote:
> GCC 8 warns about destination size with -Wstringop-truncation:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
>
> Copy DIAG_PUSH_NEEDS_COMMENT, DIAG_POP_NEEDS_COMMENT and
> DIAG_IGNORE_NEEDS_COMMENT from glibc 2.27 to silence it.
I'm inclined to think we don't need this patch. It certainly isn't
needed for binutils releases, as we don't enable -Werror by default for
releases. The problem mostly affect developers using bleeding edge
toolchains, and I have every confidence that the gcc bug will be fixed
quickly.
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.
--
Alan Modra
Australia Development Lab, IBM