This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/53612] New: __attribute__((format(...))) does not work with wchar_t format strings
- From: "vhaisman at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 08 Jun 2012 11:07:11 +0000
- Subject: [Bug c/53612] New: __attribute__((format(...))) does not work with wchar_t format strings
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53612
Bug #: 53612
Summary: __attribute__((format(...))) does not work with
wchar_t format strings
Classification: Unclassified
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: vhaisman@gmail.com
The __attribute__((format(...))) does not work for wchar_t format strings:
/*-------------8<--------------*/
#include <wchar.h>
void foo (char const * fmt, ...) __attribute__ ((format (__printf__, 1, 2)));
void wide_foo (wchar_t const * fmt, ...) __attribute__ ((format (__printf__, 1,
2)));
/*-------------8<--------------*/
I get the following error with Cygwin's GCC 4.5.3:
./format_attr_text.c:4:1: error: format string argument not a string type