This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12570] G++ fails to accept a legal struct declaration in a namespace
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Oct 2003 19:10:15 -0000
- Subject: [Bug c++/12570] G++ fails to accept a legal struct declaration in a namespace
- References: <20031010155754.12570.wirawan0@softhome.net>
- 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=12570
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From bangerth at dealii dot org 2003-10-16 19:10 -------
This is a reduced testcase:
-----------------------
namespace NS1 {
template <typename> struct S;
}
using namespace NS1;
namespace NS2 {
typedef struct { } S;
}
-----------------------
It fails with all gcc versions up to 3.3:
g/x> /home/bangerth/bin/gcc-3.3.2-pre/bin/c++ -c x.cc
x.cc:7: error: semicolon missing after struct declaration
x.cc:7: error: abstract declarator `NS2::<anonymous struct>' used as
declaration
x.cc:7: error: namespace-scope anonymous aggregates must be static
It succeeds to compile with present mainline, though, so it seems to be
fixed.
W.