format-strings-ms.c revision 47ad6ce1afad6b70927347dfa15e0f1dc76bf5bb
1// RUN: %clang_cc1 -fsyntax-only -verify -fms-compatibility -triple=i386-pc-win32 -pedantic %s 2 3int printf(const char *format, ...) __attribute__((format(printf, 1, 2))); 4 5void test() { 6 short val = 30; 7 printf("val = %I64d\n", val); // expected-warning{{'I64' length modifier is not supported by ISO C}} \ 8 // expected-warning{{format specifies type '__int64' (aka 'long long') but the argument has type 'short'}} 9} 10