danmar/simplecpp

Wrong handling of #x in macro

Opened this issue · 0 comments

Example code:

#define bar(x) x % 2
#define foo(x) printf(#x "\n")

foo(bar(3));

gcc output:

printf("bar(3)" "\n");

simplecpp output:

printf("3%2" "\n");