This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/53612] New: __attribute__((format(...))) does not work with wchar_t format strings


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]