[Bug c/64862] New: printf attribute should accept other string types
tromey at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 29 16:54:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64862
Bug ID: 64862
Summary: printf attribute should accept other string types
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tromey at gcc dot gnu.org
Consider this source:
#include <stdarg.h>
#include <uchar.h>
extern void p (const char16_t *fmt, ...)
__attribute__((__printf__ (1, 2)));
void f()
{
p(u"%d\n", 23);
}
Currently gcc rejects this attribute:
pokyo. gcc --syntax-only -std=c11 -Wall r.c
r.c:5:3: warning: ‘__printf__’ attribute directive ignored [-Wattributes]
__attribute__((__printf__ (1, 2)));
^
I don't see why it should, though.
It seems to me that it could accept wchar_t, char16_t, or char32_t
strings as the format argument.
More information about the Gcc-bugs
mailing list