------- Comment #3 from rguenth at gcc dot gnu dot org 2009-01-11 17:19 ------- Hm, it looks like we might exclude that now. From invoke.texi:
"
Similarly, access by taking the address, casting the resulting pointer
and dereferencing the result has undefined behavior, even if the cast
uses a union type, e.g.:
@smallexample
int f() @{
double d = 3.0;
return ((union a_union *) &d)->i;
@}
"
but this doesn't exactly cover the writing case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38806
