Latest GCC fails to build glibc
Florian Weimer
fweimer@redhat.com
Mon May 18 15:40:00 GMT 2015
On 05/14/2015 10:59 PM, Steve Ellcey wrote:
> A recent change to GCC (Fix to PR middle-end/66110) has caused glibc to
> fail to build. When compiling the latest glibc with the latest GCC I
> get the error below. I don't know if this is a GCC problem or a glibc
> problem. I notice that when Richard checked this in he also added the
> use of -Wno-strict-aliasing to the compilation of one of the GCC files.
> Maybe we need the same thing when compiling memstream.c?
>
> Steve Ellcey
> sellcey@imgtec.com
>
>
> In file included from memstream.c:18:0:
> memstream.c: In function 'open_memstream':
> memstream.c:92:22: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
> _IO_JUMPS ((struct _IO_FILE_plus *) &new_f->fp._sf._sbf) = &_IO_mem_jumps;
Steve, could you try the attached patch, please?
An alternative fix for some of these issues would be to use the
cast-free member access where the type of the outer object is known from
context, getting rid of _IO_JUMPS.
--
Florian Weimer / Red Hat Product Security
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Avoid-some-aliasing-violations-in-libio.patch
Type: text/x-patch
Size: 11237 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150518/49d758bb/attachment.bin>
More information about the Libc-alpha
mailing list