[Bug c/17665] wrong code with -O2
davids at webmaster dot com
gcc-bugzilla@gcc.gnu.org
Sun Sep 26 00:28:00 GMT 2004
------- Additional Comments From davids at webmaster dot com 2004-09-26 00:28 -------
Ahh, I think I get it now. If I have:
void *foo;
Then 'foo' follows the aliasing rules for a 'void *'. But if I do:
(void **)foo
The fact that 'foo' is a 'void *' has no affect on aliasing because *I* casted
it to a 'void **'. So it follows the aliasing rules for 'void **' because
that's what I specifically asked it to do.
Thanks for your patience.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17665
More information about the Gcc-bugs
mailing list