blob: 653171b4357ce977dbf70d4ca1e00b9a0e612cd6 [file] [log] [blame]
// { dg-do compile { target c++11 } }
// { dg-skip-if "char8_t" { c++2a } }
/* { dg-options "-Wformat -fdiagnostics-show-caret" } */
/* C++11-specific format tests. */
#define printf __builtin_printf
void test_u8 (const char *msg)
{
printf(u8"hello %i", msg);/* { dg-warning "format '%i' expects argument of type 'int', but argument 2 has type 'const char\\*' " } */
/* { dg-begin-multiline-output "" }
printf(u8"hello %i", msg);
~^ ~~~
| |
int const char*
%s
{ dg-end-multiline-output "" } */
}