Bug 36372 - printf format and templates doesn't work anymore
Summary: printf format and templates doesn't work anymore
Status: RESOLVED DUPLICATE of bug 35546
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-29 15:04 UTC by Jörg Richter
Modified: 2008-05-29 15:07 UTC (History)
8 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Richter 2008-05-29 15:04:19 UTC
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
Comment 1 Andrew Pinski 2008-05-29 15:07:18 UTC

*** This bug has been marked as a duplicate of 35546 ***