This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17365] Should Koenig lookup find non-functions?


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]