Latest GCC fails to build glibc
Steve Ellcey
sellcey@imgtec.com
Wed May 20 16:21:00 GMT 2015
On Mon, 2015-05-18 at 14:01 +0200, Florian Weimer wrote:
> >
> > 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.
Does anyone else have any comments on Florian's patch to get rid of the
strict-warning errors from the libio directory? I compiled it and
verified that it worked for me but I don't really feel comfortable
approving the patch as I am not very familiar with the code in this
directory and am not sure how others feel about this particular approach
to getting rid of the errors.
Steve Ellcey
sellcey@imgtec.com
More information about the Libc-alpha
mailing list