Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / warn / Wformat-ranges-c++11.C
blob653171b4357ce977dbf70d4ca1e00b9a0e612cd6
1 // { dg-do compile { target c++11 } }
2 // { dg-skip-if "char8_t" { c++2a } }
3 /* { dg-options "-Wformat -fdiagnostics-show-caret" } */
5 /* C++11-specific format tests. */
7 #define printf __builtin_printf
9 void test_u8 (const char *msg)
11   printf(u8"hello %i", msg);/* { dg-warning "format '%i' expects argument of type 'int', but argument 2 has type 'const char\\*' " } */
12 /* { dg-begin-multiline-output "" }
13    printf(u8"hello %i", msg);
14                    ~^   ~~~
15                     |   |
16                     int const char*
17                    %s
18    { dg-end-multiline-output "" } */