[Bug c++/17353] New: type name in nested class conflicts with name in outer class
giovannibajo at libero dot it
gcc-bugzilla@gcc.gnu.org
Tue Sep 7 19:44:00 GMT 2004
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
More information about the Gcc-bugs
mailing list