]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/gcc.dg/cpp/strp1.c
19960224-2.c, [...]: Update tests for new diagnostic messages.
[gcc.git] / gcc / testsuite / gcc.dg / cpp / strp1.c
CommitLineData
eaefae0e
ZW
1/* { dg-do run } */
2
3/* Regression test for stringizing and token pasting.
4 We got internal escape markers in the strings. */
5
6#include <string.h>
7b844298 7#include <stdlib.h>
eaefae0e
ZW
8
9#define S(x) _S(x)
10#define _S(x) #x
11
12#define I 1
13static const char s1[] = S(I.1);
14static const char t1[] = "1.1";
15
16#define f h
17#define h(a) a+f
18static const char s2[] = S( f(1)(2) );
74f215d7 19static const char t2[] = "1+f(2)";
eaefae0e
ZW
20
21#undef I
22#undef f
23#undef h
24
25int
26main(void)
27{
28 if (strcmp (s1, t1))
29 abort ();
30
31 if (strcmp (s2, t2))
32 abort ();
33
34 return 0;
35}
This page took 0.408429 seconds and 5 git commands to generate.