From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28332 invoked by alias); 10 Dec 2002 14:55:11 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 28313 invoked by uid 61); 10 Dec 2002 14:55:10 -0000 Date: Tue, 10 Dec 2002 06:55:00 -0000 Message-ID: <20021210145510.28312.qmail@sources.redhat.com> To: benoit.sibaud@rd.francetelecom.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: bangerth@dealii.org Reply-To: bangerth@dealii.org, benoit.sibaud@rd.francetelecom.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/8891: Unexplicit error message about naming conflict X-SW-Source: 2002-12/txt/msg00554.txt.bz2 List-Id: Synopsis: Unexplicit error message about naming conflict State-Changed-From-To: open->feedback State-Changed-By: bangerth State-Changed-When: Tue Dec 10 06:55:08 2002 State-Changed-Why: I don't know what to do with this report, since the message is probably the best you can get. In any case, there is no _naming conflict_: declaring an enum member and a class with the same name is just fine, it's only when you access that you have to make clear what you want: by default, lookup happens _within_ the class, so you get the enum name, which of course does not go well with the "operator new". If you want the class name, you have to specify that: Foo* fct() { return new ::BadName; } This compiles just fine. So what you request is that upon seeing the bogus new enum-value; line, the compiler looks up whether somewhere, outside of its usual search area, there is class name with the same name as that enum value. I think this is asking for too much. Maybe someone of the C++ front end guys can comment on what we should do with this request. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8891