| 1 |
// { dg-do compile { target { c || c++11 } } } |
| 2 |
// { dg-options "-std=gnu99" { target c } } |
| 3 |
|
| 4 |
const void *s0 = R"0123456789abcdefg()0123456789abcdefg" 0; |
| 5 |
// { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 } |
| 6 |
// { dg-error "stray" "stray" { target *-*-* } .-2 } |
| 7 |
const void *s1 = R" () " 0; |
| 8 |
// { dg-error "invalid character" "invalid" { target *-*-* } .-1 } |
| 9 |
// { dg-error "stray" "stray" { target *-*-* } .-2 } |
| 10 |
const void *s2 = R" () " 0; |
| 11 |
// { dg-error "invalid character" "invalid" { target *-*-* } .-1 } |
| 12 |
// { dg-error "stray" "stray" { target *-*-* } .-2 } |
| 13 |
const void *s3 = R")())" 0; |
| 14 |
// { dg-error "invalid character" "invalid" { target *-*-* } .-1 } |
| 15 |
// { dg-error "stray" "stray" { target *-*-* } .-2 } |
| 16 |
const void *s4 = R"@()@" 0; |
| 17 |
// { dg-error "invalid character" "invalid" { target { c || c++23_down } } .-1 } |
| 18 |
// { dg-error "stray" "stray" { target { c || c++23_down } } .-2 } |
| 19 |
// { dg-error "before numeric constant" "numeric" { target c++26 } .-3 } |
| 20 |
const void *s5 = R"$()$" 0; |
| 21 |
// { dg-error "invalid character" "invalid" { target { c || c++23_down } } .-1 } |
| 22 |
// { dg-error "stray" "stray" { target { c || c++23_down } } .-2 } |
| 23 |
// { dg-error "before numeric constant" "numeric" { target c++26 } .-3 } |
| 24 |
const void *s6 = R"`()`" 0; |
| 25 |
// { dg-error "invalid character" "invalid" { target { c || c++23_down } } .-1 } |
| 26 |
// { dg-error "stray" "stray" { target { c || c++23_down } } .-2 } |
| 27 |
// { dg-error "before numeric constant" "numeric" { target c++26 } .-3 } |
| 28 |
const void *s7 = R"\u0040()\u0040" 0; |
| 29 |
// { dg-error "invalid character" "invalid" { target *-*-* } .-1 } |
| 30 |
// { dg-error "stray" "stray" { target *-*-* } .-2 } |
| 31 |
|
| 32 |
int main () {} |