This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12620] compatibility issue with anonymous struct/union support
- From: "jbeulich at novell dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Oct 2003 07:46:34 -0000
- Subject: [Bug c++/12620] compatibility issue with anonymous struct/union support
- References: <20031015120301.12620.jbeulich@novell.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12620
------- Additional Comments From jbeulich at novell dot com 2003-10-16 07:46 -------
What is wrong is that
a) the template gets instantiated with T = int ccc::{anonymous}::* rather than T
= int ccc::* and
b) &ccc::i is calculated relative to the union base address rather than the
classes one, so if there are class members preceding the union (or base
classes), then this still continues to be zero (note that I understand that the
actual value of the member pointer should not be used, but in a debugging
context it may be of actual use).