OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [c-c++-common/] [raw-string-10.c] - Blame information for rev 295

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 295 jeremybenn
// 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.