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 "19:missing terminating" "missing" { target *-*-* } 10 }
16 const void *s2
= R
"abcdefghijklmn??/(a)abcdefghijklmn???";
17 // { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
18 // { dg-error "stray" "stray" { target *-*-* } .-2 }
19 // { dg-error "expected" "expected" { target *-*-* } .-3 }
20 const void *s3
= R
"abcdefghijklmno??/(a)abcdefghijklmno???";
21 // { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
22 // { dg-error "stray" "stray" { target *-*-* } .-2 }
23 const void *s4
= R
"abcdefghijklmnop??=(a)abcdefghijklmnop??=";
24 // { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
25 // { dg-error "stray" "stray" { target *-*-* } .-2 }
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 }