comparison gcc/testsuite/c-c++-common/raw-string-9.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 // Make sure that we properly handle trigraphs in raw strings when
2 // trigraphs are disabled, too.
3 // { dg-options "-std=gnu99" { target c } }
4 // { dg-options "-std=gnu++0x" { target c++ } }
5 // { dg-do run }
6
7 const char b[] = "??>"; // { dg-message "-trigraphs" }
8 const char a[] = R"(??>??)??/
9 ??)";
10
11 #define TEST(str, val) \
12 if (sizeof (str) != sizeof (val) \
13 || __builtin_memcmp (str, val, sizeof (str)) != 0) \
14 __builtin_abort ()
15
16 int main()
17 {
18 TEST (a, "?\?>?\?)?\?/\n?\?");
19 }