1/* { dg-do preprocess } */ 2 3/* Test source Robert Lipe, with minor modifications for the testsuite 4 by Neil Booth. 29 Oct 2000. */ 5 6#define _VA_ARGS_0() 42 7#define _L_0() ( 8#define _R_0() ) 9 10#define __VA_ARGLIST(argc,list) \ 11 _VA_ARGS_##argc list 12 13#define _CAT_LIST(argc,list1,list2) \ 14 _L_##argc list1 _R_##argc list2 15 16#define _VA_ARGLIST(argc,list1,list2) \ 17 __VA_ARGLIST(argc, \ 18 _CAT_LIST(argc, list1, list2)) 19 20#define BLAH(a) _VA_ARGLIST(a, (), ()) 21 22#if BLAH (0) != 42 23#error Simulated varargs macros 24#endif 25