This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24702] Koenig found functoid ref, but "cannot be used as a function"
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Nov 2005 13:36:58 -0000
- Subject: [Bug c++/24702] Koenig found functoid ref, but "cannot be used as a function"
- References: <bug-24702-11665@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-07 13:36 -------
Actually IIRC Koenig lookup only finds functions and not variables. If that is
the case we have two issues here. One is we accept invalid and another is that
error message is wrong.
Note ICC rejects this:
t.cc(26): error: identifier "dummyFunct" is undefined
std::cout<<"dummyFunct(d) = "<<dummyFunct(d)<<std::endl; // fails with 3.4
^
t.cc(28): error: identifier "myDummyFunct" is undefined
std::cout<<"myDummyFunct(d) = "<<myDummyFunct(d)<<std::endl;
^
t.cc(29): error: identifier "mymyDummyFunct" is undefined
std::cout<<"mymyDummyFunct(d) = "<<mymyDummyFunct(d)<<std::endl; // fails
^
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24702