131
|
1 // { dg-do compile { target c++11 } }
|
|
2 /* { dg-options "-Wformat -fdiagnostics-show-caret" } */
|
|
3
|
|
4 /* C++11-specific format tests. */
|
|
5
|
|
6 #define printf __builtin_printf
|
|
7
|
|
8 void test_u8 (const char *msg)
|
|
9 {
|
|
10 printf(u8"hello %i", msg);/* { dg-warning "format '%i' expects argument of type 'int', but argument 2 has type 'const char\\*' " } */
|
|
11 /* { dg-begin-multiline-output "" }
|
|
12 printf(u8"hello %i", msg);
|
|
13 ~^ ~~~
|
|
14 | |
|
|
15 int const char*
|
|
16 %s
|
|
17 { dg-end-multiline-output "" } */
|
|
18 }
|