1 // PR preprocessor/57620
3 // { dg-options "-std=gnu99 -trigraphs" { target c } }
4 // { dg-options "-std=c++11" { target c++ } }
6 const void *s0
= R
"abc\
8 // { dg-error "invalid character" "invalid" { target *-*-* } 6 }
9 // { dg-error "stray" "stray" { target *-*-* } 6 }
10 const void *s1
= R
"??/
12 // { dg-error "invalid new-line" "invalid" { target *-*-* } 10 }
13 // { dg-error "stray" "stray" { target *-*-* } 10 }
14 // { dg-warning "missing terminating" "missing" { target *-*-* } 10 }
15 // { dg-error "missing terminating" "missing" { target *-*-* } 10 }
16 const void *s2
= R
"abcdefghijklmn??/(a)abcdefghijklmn???";
17 // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 16 }
18 // { dg-error "stray" "stray" { target *-*-* } 16 }
19 // { dg-error "expected" "expected" { target *-*-* } 16 }
20 const void *s3
= R
"abcdefghijklmno??/(a)abcdefghijklmno???";
21 // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 20 }
22 // { dg-error "stray" "stray" { target *-*-* } 20 }
23 const void *s4
= R
"abcdefghijklmnop??=(a)abcdefghijklmnop??=";
24 // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 23 }
25 // { dg-error "stray" "stray" { target *-*-* } 23 }
26 const void *s5
= R
"abc\
28 // { dg-error "invalid character" "invalid" { target *-*-* } 26 }
29 // { dg-error "stray" "stray" { target *-*-* } 26 }
32 // { dg-error "invalid character" "invalid" { target *-*-* } 30 }
33 // { dg-error "stray" "stray" { target *-*-* } 30 }
36 // { dg-error "invalid character" "invalid" { target *-*-* } 34 }
37 // { dg-error "stray" "stray" { target *-*-* } 34 }