Bug 33004

Summary: Cannot resolve call to overloaded function and template functions)
Product: gcc Reporter: Rodolfo Schulz de Lima <rodolfo>
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED DUPLICATE    
Severity: major CC: debian-gcc, fang, gcc-bugs, igodard, msebor, nathan, pinskia, relf, rodolfo, suzev.kirill, vhaisman
Priority: P3    
Version: 4.2.1   
Target Milestone: ---   
Host: i686-pc-linux-gnu Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu Known to work:
Known to fail: Last reconfirmed:

Description Rodolfo Schulz de Lima 2007-08-06 13:50:52 UTC
The following code doesn't compile under gcc-4.2.1 on i686-pc-linux-gnu:

template <class T> void foo(T);
void foo(int);

void bar()
{
    &foo;
}

According to the discussion that began on thread http://gcc.gnu.org/ml/gcc/2007-07/msg00663.html, then resumed on thread http://gcc.gnu.org/ml/gcc/2007-07/msg00946.html, the compiler should accept the code as valid, returning the address of 'void foo(int)'.
Comment 1 Andrew Pinski 2007-08-06 13:58:37 UTC

*** This bug has been marked as a duplicate of 5458 ***