OSDN Git Service

2012-01-30 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / c-c++-common / raw-string-10.c
1 // Test that we don't revert trigraphs and line splicing when a raw string
2 // literal is formed by token pasting.
3 // { dg-options "-std=gnu99 -trigraphs" { target c } }
4 // { dg-options "-std=c++0x" { target c++ } }
5 // { dg-do run }
6
7 #define PASTE(X,Y) X##Y
8
9 const char a[] = PASTE(R,"(??>\
10 )");
11
12 #define TEST(str, val) \
13   if (sizeof (str) != sizeof (val) \
14       || __builtin_memcmp (str, val, sizeof (str)) != 0) \
15     __builtin_abort ()
16
17 int main()
18 {
19   TEST (a, "}");
20 }