ldlang won't compile with latest gcc

Ian Lance Taylor ian@airs.com
Wed Jul 27 22:05:00 GMT 2005


Richard Henderson <rth@redhat.com> writes:

> On Wed, Jul 27, 2005 at 02:12:42PM -0400, DJ Delorie wrote:
> > I'm proposing this type of solution, although we could have used a
> > union to change the type also.  Comments?
> 
> *shrug*  Or cast to void* first.

I've been looking at this issue in another context.  Is it desirable
that casting to void* should disable the warning?  The cast does not
disable the optimization which the warning is about.

See, e.g.,
    http://gcc.gnu.org/ml/gcc-help/2005-07/msg00290.html
in which a cast to char* disables the warning, but the type punning
does break the aliasing rules.

Ian



More information about the Binutils mailing list