2 /* { dg-options "-std=c99" } */
4 /* First two tests sourced from a bug report of Thomas Pornin.
5 Varargs test source Jamie Lokier.
6 All adapted for the testsuite by Neil Booth, Oct 2000. */
8 /* Tests various macro abuse is correctly expanded. */
14 /* This macro chain above sucks up the whole file once it starts, so
15 I've commented it out. The example is left for idle amusement :-) */
20 #define apply(...) apply2 (__VA_ARGS__)
21 #define half(x) ((x) / 2)
22 #define apply2(f,x) f (x)
24 extern void abort (void);
25 extern void exit (int);
29 /* Expands to c(2) then d. */
33 if (apply (half
, 200) != 100)