This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/7977: [3.2/3.3 regression] structs in anonymous union


Old Synopsis: g++-3.2 has problems with structs in anonymous union
New Synopsis: [3.2/3.3 regression] structs in anonymous union

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Fri Nov 22 11:22:58 2002
State-Changed-Why:
    I can confirm that I get errors from this code:
    ---------------------------------------
    struct bla2 {
        union {
            struct S1 { int a; } s1;
        };
    };
    -----------------------------------
    Results are
    tmp/g> /home/bangerth/bin/gcc-3.3y-pre/bin/c++ -c utest.ii
    utest.ii:3: error: `struct bla2::<anonymous union>::S1' invalid; an anonymous
       union can only have non-static data members
    
    Please don't anyone ask me whether this is valid. However,
    it compiled cleanly with 2.95, so I mark this as a regression.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7977


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]