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: Joseph Myers <joseph at codesourcery dot com>
- To: Ondřej Bílka <neleai at seznam dot cz>
- Cc: Torvald Riegel <triegel at redhat dot com>, GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Tue, 6 Jan 2015 17:20:47 +0000
- 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>
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.
> - DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args")
> + DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wmemset-transposed-args")
That part of the change is also dubious - the version is the *most recent*
version for which the diagnostic was observed, not the oldest, as it gives
information about when the suppression should be reviewed. (As explained
in the comment on DIAG_IGNORE_NEEDS_COMMENT, it should however say 5 not
5.0.)
--
Joseph S. Myers
joseph@codesourcery.com