fuhsnn / slimcc

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

Funclike macro's argument should only be expanded once #5

Closed fuhsnn closed 11 months ago

fuhsnn commented 11 months ago
#define M(X) X X
M(__COUNTER__)
M(__COUNTER__)

gcc, clang, and tcc output

0 0
1 1