simplecpp icon indicating copy to clipboard operation
simplecpp copied to clipboard

Wrong handling of #x in macro

Open danmar opened this issue 2 years ago • 1 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");

danmar avatar May 09 '23 16:05 danmar