#include void print_me() { std::cout << "global function" << std::endl; } template struct wrapper { void print_me() { std::cout << "base member function" << std::endl; } }; template struct derived : public wrapper { derived() { print_me(); // calls global function (correct) with gcc 4.1 // calls wrapper::print_me (non-compliant) with gcc 3.2 this->print_me(); // calls wrapper::print_me wrapper::print_me(); // calls wrapper::print_me derived::print_me(); // calls wrapper::print_me } }; int main(int argc, char** argv) { derived x; return 0; }