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: Incomplete patch to fix build with top-of-tree GCC


On Fri, 15 May 2015, Steve Ellcey wrote:

> I was wondering if anyone can help me with a patch to fix the glibc
> build with the latest GCC.  A recent GCC patch to fix middle-end/66110
> caused us to get some new strict-aliasing errors.  I can do the
> mechanical change to use the DIAG_* macros to allow the
> non-strict-aliasing but the macros need to be accompanied by a comment
> about why it is OK to ignore the warnings and I am not sure how to write
> a coherent explanation of that since I am not familiar with the code in
> question.  Here is the patch I have so far with no comments, does any
> one want to help finish it by adding some comments?

The first question is: *is* it OK to ignore the warnings?  In general I'd 
expect -Wstrict-aliasing warnings to indicate -fno-strict-aliasing is 
needed, or else the code needs to be fixed to avoid the aliasing issues - 
if a warning is generated, optimizations might also miscompile the code.

The section question is: do these warnings indicate GCC bugs?  Because if 
they do, given it's an issue with current development GCC rather than a 
release, getting the bugs fixed in GCC would be better than working around 
them in glibc.

-- 
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]