------- Additional Comments From gdr at integrable-solutions dot net 2005-07-21 02:35 ------- Subject: Re: ICE with anonymous unions
"giovannibajo at libero dot it" <[EMAIL PROTECTED]> writes: | Yes, it's because of my patch. | | I would like to know if we agree that the code is invalid or not. It's a bit | hard to have a definitive answer since it is GNU C++ (uses an extension), but | given that the C frontend accepts it, I don't see why we should reject it. In | which case, this bug can be closed as fixed. [I will address the validity issue as far as GNU C++ is concerned ] Clearly, this being invalid according to ISO C++ and accepted by the C front-end (with appropriate diagnostic), the only question that remains is whether this is valid C++ typedef union { struct unique_name_1 { int i; }; struct unique_name_2 { char c; }; } A; The answer is yes. Now, the remaning thing is apply the name restrictions as for unnamed unions. Thanks, -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15938