[Bug c++/14290] New: Namespaces shadow direct struct declarations
finnag at pvv dot ntnu dot no
gcc-bugzilla@gcc.gnu.org
Wed Feb 25 12:20:00 GMT 2004
In the following code, the Works class compiles fine, but Nowork fails to
compile with the following error. This fails the same way both with gcc 2.95.4
and 3.3.2:
$ gcc -c tstgcc.cxx
tstgcc.cxx:9: error: semicolon missing after declaration of `Nowork::X'
$ cat tstgcc.cxx
namespace ns {}
class Works {
class X { };
X ns; // This is ok
};
class Nowork {
class X { } ns; // This fails
};
--
Summary: Namespaces shadow direct struct declarations
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: finnag at pvv dot ntnu dot no
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: 3.3.2
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14290
More information about the Gcc-bugs
mailing list