summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/paste7.c
blob: ce29db8477db4122ab57f41b8d3ffe20620532a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do run } */

#define D_2 1, 2
#define C_2(X, I0, I1) X##_a = I0, X##_b = I1
#define B_2(X, I) C_2(X, I)
#define A(N, X) B_##N (X, D_##N)

extern void abort(void);
extern void exit(int);

int x_a, x_b;

int main(void)
{
  A(2, x);
  if (x_a != 1 || x_b != 2)
    abort();
  exit(0);
}