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)'. -- Summary: Cannot resolve call to overloaded function and template functions) Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rodolfo at rodsoft dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33004