PR tree-optimization/33562
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / macro5.c
blob9e226b871fa07a9a2743306dee1126e71214e270
1 /* { dg-do preprocess } */
3 /* Test source Robert Lipe, with minor modifications for the testsuite
4 by Neil Booth. 29 Oct 2000. */
6 #define _VA_ARGS_0() 42
7 #define _L_0() (
8 #define _R_0() )
10 #define __VA_ARGLIST(argc,list) \
11 _VA_ARGS_##argc list
13 #define _CAT_LIST(argc,list1,list2) \
14 _L_##argc list1 _R_##argc list2
16 #define _VA_ARGLIST(argc,list1,list2) \
17 __VA_ARGLIST(argc, \
18 _CAT_LIST(argc, list1, list2))
20 #define BLAH(a) _VA_ARGLIST(a, (), ())
22 #if BLAH (0) != 42
23 #error Simulated varargs macros
24 #endif