Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / cpp / strp1.c
blob096d968c96bd3d57c4c5a489fad932cc2d822125
1 /* { dg-do run } */
3 /* Regression test for stringizing and token pasting.
4 We got internal escape markers in the strings. */
6 #include <string.h>
7 #include <stdlib.h>
9 #define S(x) _S(x)
10 #define _S(x) #x
12 #define I 1
13 static const char s1[] = S(I.1);
14 static const char t1[] = "1.1";
16 #define f h
17 #define h(a) a+f
18 static const char s2[] = S( f(1)(2) );
19 static const char t2[] = "1+h(2)";
21 #undef I
22 #undef f
23 #undef h
25 int
26 main(void)
28 if (strcmp (s1, t1))
29 abort ();
31 if (strcmp (s2, t2))
32 abort ();
34 return 0;