This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Latest GCC fails to build glibc
- From: Steve Ellcey <sellcey at imgtec dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 20 May 2015 08:31:12 -0700
- Subject: Re: Latest GCC fails to build glibc
- Authentication-results: sourceware.org; auth=none
- References: <24211622-19d7-4514-be3c-337c241188d2 at BAMAIL02 dot ba dot imgtec dot org> <5559D484 dot 8090002 at redhat dot com>
- Reply-to: <sellcey at imgtec dot com>
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