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 tree-optimization/38806] [4.4 Regression] Access through union does not conflict properly



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


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