[PATCHv3] S390: Fix build failure in test string/tst-endian.c with gcc 6.
Stefan Liebler
stli@linux.vnet.ibm.com
Fri Jan 22 12:29:00 GMT 2016
On 01/21/2016 05:44 PM, Mike Frysinger wrote:
> On 21 Jan 2016 17:38, Stefan Liebler wrote:
>> This patch suppresses these warnings with DIAG_* macros.
>> The conditional #if __GNUC_PREREQ (6, 0) is needed, because an older gcc
>> would warn about:
>> tst-endian.c: In function âdo_testâ:
>> tst-endian.c:18:4: warning: unknown option after â#pragma GCC
>> diagnosticâ kind [-Wpragmas]
>> DIAG_IGNORE_NEEDS_COMMENT (6, "-Wtautological-compare");
>> ^
>
> you can at least do it once at the top via a local define:
> /* big comment block */
> #if __GNUC_PREREQ (6, 0)
> # define DIAG_IGNORE_NEEDS_COMMENT_AUTOLOGICAL_COMPARE() \
> DIAG_IGNORE_NEEDS_COMMENT (6, "-Wtautological-compare");
> #else
> # define DIAG_IGNORE_NEEDS_COMMENT_AUTOLOGICAL_COMPARE()
> #endif
>
> then the inline usage is simple
> -mike
>
That's a good point.
Here is the updated patch.
Ok to commit?
Bye Stefan
ChangeLog:
* string/tst-endian.c: Include <libc-internal.h>
(do_test): Ignore tautological-compare warnings around
"htobeXX (beXXtoh (i)) != i" and
"htoleXX (leXXtoh (i)) != i" if-statements.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20160121_tst-endian_gcc6_v3.patch
Type: text/x-patch
Size: 2241 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160122/c4bffb62/attachment.bin>
More information about the Libc-alpha
mailing list