This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: S390: Fix build failure in test string/tst-endian.c with gcc 6.
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Thu, 21 Jan 2016 14:05:41 +0000
- Subject: Re: S390: Fix build failure in test string/tst-endian.c with gcc 6.
- Authentication-results: sourceware.org; auth=none
- References: <n7qj1p$1em$1 at ger dot gmane dot org>
On Thu, 21 Jan 2016, Stefan Liebler wrote:
> This patch makes these if-statements conditional on __BYTE_ORDER ==
> __LITTLE_ENDIAN.
I don't think that's the right fix.
This test is verifying assertions that should be true for both
endiannesses. It just so happens that some of those assertions can be
verified at compile time in some cases, but they are still appropriate
assertions for it to verify.
This is one of the cases where the nature of what is being tested requires
doing something that GCC warns about. In such a case, rather than
disabling the testing of those assertions, you should disable the warning
(with DIAG_* macros if possible - if glibc supports building with GCC
versions without the relevant -W option, they'll need to be appropriately
conditional), with appropriate comments explaining the issue.
--
Joseph S. Myers
joseph@codesourcery.com