Sorry in advance if this is a dup. Dependent lookup considers static candidate functions, which seems to be in violation of 14.6.4.2. A dejagnu-style testcase:
// { dg-do run } extern "C" void abort (void); void f(int) {} static void f(char) { abort(); } template<class T> void g(T t) { f(t); } int main() { g('a'); } -- Summary: Dependent lookup considers static functions Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rsandifo at gcc dot gnu 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=24977