This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Ignore warning in string/tester.c.
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Torvald Riegel <triegel at redhat dot com>, GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Tue, 6 Jan 2015 18:55:45 +0100
- Subject: Re: [PATCH] Ignore warning in string/tester.c.
- Authentication-results: sourceware.org; auth=none
- References: <1418670947 dot 7165 dot 1 dot camel at triegel dot csb> <20150106164532 dot GA25118 at domone> <alpine dot DEB dot 2 dot 10 dot 1501061713210 dot 5282 at digraph dot polyomino dot org dot uk>
On Tue, Jan 06, 2015 at 05:20:47PM +0000, Joseph Myers wrote:
> On Tue, 6 Jan 2015, OndÅej BÃlka wrote:
>
> > On Mon, Dec 15, 2014 at 08:15:47PM +0100, Torvald Riegel wrote:
> > > This fixes a warning in a build using a fairly recent GCC. AFAIK the
> > > warning/option is new and hasn't been offered by 4.9, hence the
> > > conditional. OK?
> >
> > I also got warning in debian gcc-4.9 so I commited following as obvious.
>
> No, it's not obvious; as far as I can tell, the option is not in GCC 4.9
> branch, so resulting in
>
> tester.c: In function 'test_memset':
> tester.c:1311:3: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]
> DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wmemset-transposed-args")
> ^
> cc1: all warnings being treated as errors
>
> and breaking the build. Please revert the patch. If distributions have
> backported this warning, a configure test will be needed to determine
> whether it can be suppressed.
>
ok, however that is bad policy as you would need to add exception every
time some distribution decides to backport warning. I would rather
disable -Werror=pragmas.