template<class T> void myPrintf( const char * fmt, ... ) __attribute__ ((__format__ (__printf__, 1, 2))); template<class T> void myPrintf( const char * fmt, ... ) { } void func() { myPrintf<int>( "test" ); } $ g++ t.cc t.cc: In function 'void func()': t.cc:6: error: '__printf__' was not declared in this scope t.cc:6: error: unrecognized format specifier Works with GCC 4.1.1
*** This bug has been marked as a duplicate of 35546 ***