This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/38806] [4.4 Regression] Access through union does not conflict properly
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jan 2009 17:19:27 -0000
- Subject: [Bug tree-optimization/38806] [4.4 Regression] Access through union does not conflict properly
- References: <bug-38806-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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