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]

[Bug c++/12570] G++ fails to accept a legal struct declaration in a namespace


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.


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