This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: S390: Fix build failure in test string/tst-endian.c with gcc 6.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]