This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ldlang won't compile with latest gcc
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