This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17365] Should Koenig lookup find non-functions?
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Sep 2004 22:26:45 -0000
- Subject: [Bug c++/17365] Should Koenig lookup find non-functions?
- References: <20040909014604.17365.giovannibajo@libero.it>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2004-09-09 22:26 -------
Subject: Re: New: Should Koenig lookup find non-functions?
"giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> writes:
[...]
| [basic.lookup.unqual]/3
| "For purposes of determining (during parsing) whether an expression
| is a postfix-expression for a function call, the usual name lookup
| rules apply. The rules in [basic.lookup.koenig] have no effect on the
| syntactic interpretation of an expression.
|
|
| So, it would be strange if koenig lookup found also non-functions, as it cannot
| change the interpretation of the expression anyway. This also agrees with what
| EDG does (consider the code above valid).
Whether "argument dependent name lookup" should find a non-function
is a HOT topic and an issue in Core, with active status. I don't
think anything should be done in this area before we know where we
head. Most definitely the wording is sufficiently ambiguous to allow
GCC behaviour. As noted in the corresponding Core issue, name lookup
is applied uniformly and anything else is pure accident and should be
fixed -- which means that ADL can find non-functions. Please consult
the "summary" on the debate on the Core issue list (the whole debate
is much much larger than the summary publically made available).
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17365