[Bug c++/11314] New: unqualified lookup prefers functions to non-functions
sebor at roguewave dot com
gcc-bugzilla@gcc.gnu.org
Tue Jun 24 21:02:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11314
Summary: unqualified lookup prefers functions to non-functions
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sebor at roguewave dot com
CC: gcc-bugs at gcc dot gnu dot org
The program below (example from 3.4.1, p3 corrected by DR139 --
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html#139) is supposed to
return 0. It exits with 1 when compiled with gcc 3.2 suggesting that gcc fails
to correctly implement unqualified lookup. This might be related to PR #11296:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11296
Martin
typedef int f;
namespace N {
struct A {
friend int f (A) { return 1; }
operator int () const { return 0; }
int g (A a) {
return f (a);
}
};
}
int main ()
{
return N::A ().g (N::A ());
}
More information about the Gcc-bugs
mailing list