>Number: 8891 >Category: c++ >Synopsis: Unexplicit error message about naming conflict >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Dec 10 06:36:04 PST 2002 >Closed-Date: >Last-Modified: >Originator: BenoƮt Sibaud >Release: gcc-3.2.1 >Organization: >Environment: Debian Sarge i686-pc-linux-gnu >Description: class Foo { protected: enum {BadName, A, B, C}; }; class BadName : public Foo { }; class Toto : public Foo { public: Foo* fct() { return new BadName; } }; $ g++ -Wall foo.cpp foo.cpp: In member function `Foo* Toto::fct()': foo.cpp:18: parse error before `;' token foo.cpp:18: warning: no return statement in function returning non-void Conflict between ::BadName and BadName in Foo enum. The error message is not really helpful (the enum was deeply hidden in a class hierarchy in my case). Tested with several 2.95.2, 3.0.x, 3.1.x and 3.2.x versions. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: