This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Operator name lookup
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 Sep 2002 17:37:35 -0700
- Subject: Operator name lookup
- Reply-to: mark at codesourcery dot com
G++ presently accepts this code:
typedef int B;
struct A
{
int B;
operator B *();
};
EDG and the new parser agree -- this is invalid. (In particular, the
"B" in "operator B*" refers to "A::B", not "::B".)
I do not find anything in the standard that justifies G++'s present
interpretation.
Unless I hear objections, I will consider this a bug in G++ (despite
the fact that g++.old-deja/g++.other/lookup19.C tests for this
behavior). Therefore, I will not try to add support for this
extension to the new parser, and I will add an appropriate NEWS entry.
Comments?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com