Bug 33004 - Cannot resolve call to overloaded function and template functions)
Summary: Cannot resolve call to overloaded function and template functions)
Status: RESOLVED DUPLICATE of bug 5458
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.2.1
: P3 major
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-06 13:50 UTC by Rodolfo Schulz de Lima
Modified: 2007-08-06 13:58 UTC (History)
11 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***