------- Comment #1 from pinskia at gcc dot gnu dot org 2009-08-14 19:10 ------- You are wrong to assume that the cast to char* changes the aliasing violation. In fact it is an access via char which is able to be done to any other type. So this: (((unsigned short *)(char *)&(ans)))[1] is an access of an float variable as an unsigned short and there is an aliasing violation there.
*** This bug has been marked as a duplicate of 21920 *** -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41072