This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/14319] incorrect optimization of union of structs with common initial sequences
- From: "rth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2004 08:37:49 -0000
- Subject: [Bug c/14319] incorrect optimization of union of structs with common initial sequences
- References: <20040227052920.14319.jsturm@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rth at gcc dot gnu dot org 2004-02-27 08:37 -------
As gcc currently reads 6.5.2.3#5, you must actually use the union type
at the point of reference. I.e. u.x.x and u.y.y will be considered to
conflict, as would up->x.x and up->y.y. This implementation detail is
even documented in the -fstrict-aliasing option summary.
Any change in behaviour here will have to wait until DR 257 is resolved.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14319