fuhsnn / slimcc

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

__VA_OPT__ should be treated like parameter #6

Closed fuhsnn closed 11 months ago

fuhsnn commented 11 months ago

Not only can it be stringized, parameters in its argument are subject to substitution

#define FOO BAR
#define M2(x,y,...) #__VA_OPT__(y##x __VA_ARGS__)
M2(a,b,FOO)
"ba BAR"