1 // { dg-do compile { target c++11 } }
2 // { dg-skip-if "char8_t" { c++2a } }
3 /* { dg-options "-Wformat -fdiagnostics-show-caret" } */
4 
5 /* C++11-specific format tests. */
6 
7 #define printf __builtin_printf
8 
test_u8(const char * msg)9 void test_u8 (const char *msg)
10 {
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 "" } */
19 }
20