tyfkda / xcc

Standalone C compiler/assembler/linker/libc for x86-64/aarch64/riscv64/wasm
https://tyfkda.github.io/xcc/
MIT License
254 stars 17 forks source link

#if is ignored in macro arguments #97

Closed tyfkda closed 1 year ago

tyfkda commented 2 years ago
#define FOO(x)  {x}

FOO(
#if 1
    bar
#else
    qux
#endif
)

expected:

{bar}

current output:

{#if 1
bar
#else
qux
#endif
}