This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13639] New: enum member is not allowed to have same name as the namespace it is contained in
- From: "rschiele at uni-mannheim dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jan 2004 16:46:37 -0000
- Subject: [Bug c++/13639] New: enum member is not allowed to have same name as the namespace it is contained in
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
An enum member is not allowed to have same name as the namespace it is
contained in.
The code
namespace a {
enum { a };
};
is rejected with:
bug.cc:2: error: `a' redeclared as different kind of symbol
bug.cc:1: error: previous declaration of `a'
As far as I understand the C++ standard this is perfectly allowed.
--
Summary: enum member is not allowed to have same name as the
namespace it is contained in
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rschiele at uni-mannheim dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i586-suse-linux
GCC host triplet: i586-suse-linux
GCC target triplet: i586-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13639