OSDN Git Service

2013-07-08 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / c-c++-common / raw-string-7.c
1 // The trailing whitespace after \ and before newline extension
2 // breaks full compliance for raw strings.
3 // { dg-do run { xfail *-*-* } }
4 // { dg-options "-std=gnu99" { target c } }
5 // { dg-options "-std=c++0x" { target c++ } }
6
7 // Note, there is a single space after \ on the following line.
8 const char *s0 = R"(\ 
9 )";
10 // { dg-bogus "backslash and newline separated by space" "" { xfail *-*-* } 8 }
11
12 // Note, there is a single tab after \ on the following line.
13 const char *s1 = R"(\   
14 )";
15 // { dg-bogus "backslash and newline separated by space" "" { xfail *-*-* } 13 }
16
17 int
18 main (void)
19 {
20   if (__builtin_strcmp (s0, "\\ \n") != 0
21       || __builtin_strcmp (s1, "\\\t\n") != 0)
22     __builtin_abort ();
23   return 0;
24 }