This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/17665] wrong code with -O2


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]