PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / c-c++-common / raw-string-10.c
blob76ed34e60c34e1b372c7c3ba03baffd05d4f9b5f
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 }
7 #define PASTE(X,Y) X##Y
9 const char a[] = PASTE(R,"(??>\
10 )");
12 #define TEST(str, val) \
13 if (sizeof (str) != sizeof (val) \
14 || __builtin_memcmp (str, val, sizeof (str)) != 0) \
15 __builtin_abort ()
17 int main()
19 TEST (a, "}");