Debian Codegraph @

gcc/testsuite/g++.dg/diagnostic/string-literal-concat.C

raw
1 /* { dg-options "-fdiagnostics-show-caret -std=c++11" } */
2
3 const void *s = u8"a" u"b"; // { dg-error "24: concatenation" }
4 /* { dg-begin-multiline-output "" }
5 const void *s = u8"a" u"b";
6 ~~~~~ ^~~~
7 { dg-end-multiline-output "" } */
8
9 const void *s2 = u"a" u"b" u8"c"; // { dg-error "30: concatenation" }
10 /* { dg-begin-multiline-output "" }
11 const void *s2 = u"a" u"b" u8"c";
12 ~~~~ ^~~~~
13 { dg-end-multiline-output "" } */
14
15 #define TEST_U8_LITERAL u8"a"
16
17 const void *s3 = TEST_U8_LITERAL u8"b";
18
19 const void *s4 = TEST_U8_LITERAL u"b"; // { dg-error "34: concatenation" }
20 /* { dg-begin-multiline-output "" }
21 const void *s4 = TEST_U8_LITERAL u"b";
22 ^~~~
23 { dg-end-multiline-output "" } */