This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15471] [3.4/3.5 Regression] Incorrect member pointer offsets in anonymous structs/unions
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 May 2004 12:07:59 -0000
- Subject: [Bug c++/15471] [3.4/3.5 Regression] Incorrect member pointer offsets in anonymous structs/unions
- References: <20040515213947.15471.us15@os.inf.tu-dresden.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2004-05-26 12:07 -------
I couldn't find the relevant paragraph in the standard, thus I am not sure this
is actually legal code. It must be noted that EDG in strict mode accepts it and
generates the same address for both pointers (which is by no doubt the correct
behaviour, once we assume the code is legal).
GCC rejects this snippet up to 3.4. Since 3.4, we accept the snippet but
generate wrong code with it. I rate this as a regression nonetheless, since
wrong-code is much worse than what we used to do.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |giovannibajo at libero dot
| |it
Severity|normal |critical
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |wrong-code
Known to fail| |2.95.3 3.0.4 3.3.3 3.4.0
| |3.5.0
Last reconfirmed|0000-00-00 00:00:00 |2004-05-26 12:07:55
date| |
Summary|Incorrect member pointer |[3.4/3.5 Regression]
|offsets in anonymous |Incorrect member pointer
|structs/unions |offsets in anonymous
| |structs/unions
Target Milestone|--- |3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15471