OSDN Git Service

* gcc.dg/cpp/ucs.c: Improved long UCS test.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / cpp / trigraphs.c
1 /* { dg-do run } */
2 /* { dg-options "-ansi" } */
3
4 extern void abort (void);
5
6 /* Basic tests for trigraph conversion.
7    All of them are here, but not in all possible contexts.  *??/
8 /
9
10 ??=include <stdio.h>
11
12 ??=define TWELVE 1??/
13 2
14
15 static const char str??(??) = "0123456789??/n";
16
17 int
18 main(void)
19 ??<
20   unsigned char x = 5;
21
22   if (sizeof str != TWELVE)
23     abort ();
24
25   /* Test ^=, the only multi-character token to come from trigraphs.  */
26   x ??'= 3;
27   if (x != 6)
28     abort ();
29
30   if ((5 ??! 3) != 7)
31     abort ();
32
33   return 0;
34 ??>