[Bug c++/12620] compatibility issue with anonymous struct/union support

jbeulich at novell dot com gcc-bugzilla@gcc.gnu.org
Thu Oct 16 07:46:00 GMT 2003


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



More information about the Gcc-bugs mailing list