I: gcc 3.0.1 bug
Alexandre Oliva
aoliva@redhat.com
Sun Sep 30 17:26:00 GMT 2001
On Sep 30, 2001, "Cyril Malkov" <malkov@lostpassword.com> wrote:
> The following code:
violates the aliasing rules imposed by the C Standard, when it
accesses part of an `unsigned long' object as if it were an `unsigned
short'. There's nothing wrong in GCC's moving the accesses around to
the point of their getting the wrong value, because under strict
aliasing rules, the accesses can't alias. Use -fno-strict-aliasing to
disable the correct optimization that is exposing a bug in your code.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
More information about the Gcc-bugs
mailing list