[Bug c++/12570] G++ fails to accept a legal struct declaration in a namespace
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Thu Oct 16 19:10: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=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.
More information about the Gcc-bugs
mailing list