[Bug c++/35668] New: [4.3 Regression] printf attribute not recognized in template function
ian at airs dot com
gcc-bugzilla@gcc.gnu.org
Sat Mar 22 18:49:00 GMT 2008
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
More information about the Gcc-bugs
mailing list