OSDN Git Service

2010-04-27 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / c-c++-common / raw-string-4.c
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++ } }
5
6 const int       i0      = R'a'; // { dg-error "was not declared|undeclared" }
7                 // { dg-error "expected ',' or ';'" "" { target *-*-* } 6 }
8 const int       i1      = uR'a';        // { dg-error "was not declared|undeclared" }
9                 // { dg-error "expected ',' or ';'" "" { target *-*-* } 8 }
10 const int       i2      = UR'a';        // { dg-error "was not declared|undeclared" }
11                 // { dg-error "expected ',' or ';'" "" { target *-*-* } 10 }
12 const int       i3      = u8R'a';       // { dg-error "was not declared|undeclared" }
13                 // { dg-error "expected ',' or ';'" "" { target *-*-* } 12 }
14 const int       i4      = LR'a';        // { dg-error "was not declared|undeclared" }
15                 // { dg-error "expected ',' or ';'" "" { target *-*-* } 14 }
16
17 #define R       1 +
18 #define uR      2 +
19 #define UR      3 +
20 #define u8R     4 +
21 #define LR      5 +
22
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';
28
29 int main () {}