This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: subreg question
- From: Joe Buck <jbuck at synopsys dot COM>
- To: aldyh at redhat dot com (Aldy Hernandez)
- Cc: drow at mvista dot com (Daniel Jacobowitz),dalej at apple dot com (Dale Johannesen), gcc at gcc dot gnu dot org (gcc external)
- Date: Thu, 13 Dec 2001 14:56:15 -0800 (PST)
- Subject: Re: subreg question
> > The C standard's aliasing rules. *((float *)&z) is an object of type
> > float; double is a different type than float; z is an object of type
> > double; *((float *)&z) and z can not alias.
>
> agreed. be that as it may dale, if the compiler is crashing, it's a
> bug, so it needs to be fixed :)
Right. The compiler must not crash for any input whatsoever, no matter
how nonstandard, otherwise it's a bug, and a rather severe one at that.
And this is the type of non-standardness that our users are likely to
feed to us, since the C aliasing rules are not widely known about even
by experienced C programmers.