This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17353] New: type name in nested class conflicts with name in outer class
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Sep 2004 19:44:09 -0000
- Subject: [Bug c++/17353] New: type name in nested class conflicts with name in outer class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code does not compile:
--------------------------------------------------
struct cause_error
{
typedef int type;
struct nested { typedef type type; };
};
--------------------------------------------------
jeff.cc:4: error: declaration of `typedef int cause_error::nested::type'
jeff.cc:3: error: changes meaning of `type' from `typedef int cause_error::type'
I am fairly positive it is legal code, though. It never compiled on any version
of GCC so far.
--
Summary: type name in nested class conflicts with name in outer
class
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: giovannibajo at libero dot it
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17353