aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/cpp/va-opt-9.c
blob: 5f73ad034266b6a293ee5317e6c6c9b20ea8da94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR preprocessor/89971 */
/* { dg-do compile } */
/* { dg-options "-std=gnu99" { target c } } */
/* { dg-options "-std=c++20" { target c++ } } */

int a, c;
#define m1(...) a /##__VA_OPT__(b) c
#define m2(...) a /##__VA_OPT__() c
#define m3(...) a##__VA_OPT__()##b = 1
#define m4(...) a##__VA_OPT__(b c d)##e = 2

int
foo (void)
{
  int d = m1();
  int e = m2(1);
  int m3(1 2 3);
  int m4();
  return d + e + ab + ae;
}