This is the mail archive of the
mailing list for the GCC project.
Re: Operator name lookup
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 21 Sep 2002 11:28:28 +0200
- Subject: Re: Operator name lookup
- Organization: Integrable Solutions
- References: <200209210037.g8L0bZ714496@localhost.localdomain>
Mark Mitchell <email@example.com> writes:
| 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
G++'s current behaviour is bogus -- as is usual when it comes to name
lookup :-(. Ordinary name lookup finds A::B and stops.
| Therefore, I will not try to add support for this
| extension to the new parser, and I will add an appropriate NEWS entry.
I'm not convinced that was a feature :-) :-) Please just ditch it.