This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14290] New: Namespaces shadow direct struct declarations
- From: "finnag at pvv dot ntnu dot no" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Feb 2004 12:20:38 -0000
- Subject: [Bug c++/14290] New: Namespaces shadow direct struct declarations
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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