http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47752
Summary: Non-dependent name is found in dependent base class although it should be rejected Product: gcc Version: 4.5.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: volker.simo...@gmail.com Consider the following example: =================================================== template<typename T> struct B { void f(int i) { } void f2() { } }; template<typename T> struct D : public B<T> { int foo(int i) { return i; } void g() { // f(42); // (1) f(foo(42)); // (2) // f2(); // (3) } }; struct E : public D<int> { void h() { g(); } }; ===================================================== This compiles fine with g++ 4.5.2. If one of the lines (1) or (2) is uncommented, the compilation fails with: dependent2.cpp:11: error: there are no arguments to ‘f’ that depend on a template parameter, so a declaration of ‘f’ must be available dependent2.cpp:13: error: there are no arguments to ‘f2’ that depend on a template parameter, so a declaration of ‘f2’ must be available I think the compilation of the call 'f(foo(42))' should fail for the same reason. Regards, Volker