quakeforge/tools/qfcc/test/preproc-1.r
Bill Currie fc03e7eb7a [qfcc] Recursively expand __VA_OPT__'s argument
This seems to do the right thing, and my test case (copied from the C
spec) passes finally.
2023-11-18 18:09:34 +09:00

10 lines
166 B
R

#define LPAREN() (
#define G(Q) 42
#define F(R, X, ...) __VA_OPT__(G R X) )
int x = F(LPAREN(), 0, <:-); // replaced by int x = 42;
int
main ()
{
return x != 42;
}