[Bug c++/36372] New: printf format and templates doesn't work anymore
joerg dot richter at pdv-fs dot de
gcc-bugzilla@gcc.gnu.org
Thu May 29 15:04:00 GMT 2008
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
--
Summary: printf format and templates doesn't work anymore
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: joerg dot richter at pdv-fs dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36372
More information about the Gcc-bugs
mailing list