fuhsnn / slimcc

C11 compiler with GNU extensions for x86-64 Linux, working towards C23
MIT License
34 stars 4 forks source link

GCC `,##__VA_ARGS__` extension behavior #7

Closed fuhsnn closed 11 months ago

fuhsnn commented 11 months ago

The omission shouldn't trigger when a comma preceding the empty argument is present.

#define M(x,y,...) x y ,##__VA_ARGS__
M(a,b,)
M(a,b)

should output:

a b ,
a b