------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-02 00:09 ------- Because we only warn if you take the address and then cast so if you have a tempary variable inbetween, we don't warn.
Note really strict aliasing warnings are hard to produce as it is only a bug if you access via those two types. Aka this is valid and defined (even though we warn): float a(float b) { int i; *(float*)&i = b; return *(float*)&i; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20709