This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Incomplete patch to fix build with top-of-tree GCC
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Steve Ellcey <sellcey at imgtec dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 15 May 2015 16:47:42 +0000
- Subject: Re: Incomplete patch to fix build with top-of-tree GCC
- Authentication-results: sourceware.org; auth=none
- References: <1431708170 dot 16668 dot 8 dot camel at ubuntu-sellcey>
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