This C++ test case works with 4.2 and fails with 4.3.
template<typename T> extern void foo(const char*, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
template<typename T> void foo(const char* format, ...) {}
void bar() { foo<int>("%s\n", "foo"); }
With 4.3 I get:
foo.cc: In function void bar():
foo.cc:3: error: __printf__ was not declared in this scope
foo.cc:3: error: unrecognized format specifier
--
Summary: [4.3 Regression] printf attribute not recognized in
template function
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35668