PR target/83368
[official-gcc.git] / gcc / testsuite / c-c++-common / raw-string-4.c
blob303233bb344ecae2b883fc52f49d7ce413863bc5
1 // R is not applicable for character literals.
2 // { dg-do compile }
3 // { dg-options "-std=gnu99" { target c } }
4 // { dg-options "-std=c++0x" { target c++ } }
6 const int i0 = R'a'; // { dg-error "was not declared|undeclared" "undeclared" }
7 // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
8 const int i1 = uR'a'; // { dg-error "was not declared|undeclared" "undeclared" }
9 // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
10 const int i2 = UR'a'; // { dg-error "was not declared|undeclared" "undeclared" }
11 // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
12 const int i3 = u8R'a'; // { dg-error "was not declared|undeclared" "undeclared" }
13 // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
14 const int i4 = LR'a'; // { dg-error "was not declared|undeclared" "undeclared" }
15 // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
17 #define R 1 +
18 #define uR 2 +
19 #define UR 3 +
20 #define u8R 4 +
21 #define LR 5 +
23 const int i5 = R'a';
24 const int i6 = uR'a';
25 const int i7 = UR'a';
26 const int i8 = u8R'a';
27 const int i9 = LR'a';
29 int main () {}