This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17665] wrong code with -O2
- From: "davids at webmaster dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Sep 2004 18:24:38 -0000
- Subject: [Bug c/17665] wrong code with -O2
- References: <20040924231306.17665.davids@webmaster.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From davids at webmaster dot com 2004-09-25 18:24 -------
Look in 'alias.c' and search for the string 'a void pointer'. The aliasing code
is supposed to assume that a 'void *' can alias anything. The variable 'head'
is a 'void *'.
I'll check the standard again, but my recollection is that it's supposed to be
safe to cast any pointer to and from a 'void *'. That's why 'malloc'
returns 'void *'.
DS
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17665