This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7977: [3.2/3.3 regression] structs in anonymous union
- From: bangerth at dealii dot org
- To: ehlert at linux dot de, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 22 Nov 2002 19:22:59 -0000
- Subject: Re: c++/7977: [3.2/3.3 regression] structs in anonymous union
- Reply-to: bangerth at dealii dot org, ehlert at linux dot de, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
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