public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13639] New: enum member is not allowed to have same name as the namespace it is contained in
@ 2004-01-10 16:46 rschiele at uni-mannheim dot de
2004-01-10 16:57 ` [Bug c++/13639] " rschiele at uni-mannheim dot de
0 siblings, 1 reply; 2+ messages in thread
From: rschiele at uni-mannheim dot de @ 2004-01-10 16:46 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/13639] enum member is not allowed to have same name as the namespace it is contained in
2004-01-10 16:46 [Bug c++/13639] New: enum member is not allowed to have same name as the namespace it is contained in rschiele at uni-mannheim dot de
@ 2004-01-10 16:57 ` rschiele at uni-mannheim dot de
0 siblings, 0 replies; 2+ messages in thread
From: rschiele at uni-mannheim dot de @ 2004-01-10 16:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rschiele at uni-mannheim dot de 2004-01-10 16:57 -------
Oops, was already there. ;-)
*** This bug has been marked as a duplicate of 13544 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13639
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-10 16:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-10 16:46 [Bug c++/13639] New: enum member is not allowed to have same name as the namespace it is contained in rschiele at uni-mannheim dot de
2004-01-10 16:57 ` [Bug c++/13639] " rschiele at uni-mannheim dot de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).