Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/warn/Wformat-ranges-c++11.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
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 } |