arocc
arocc copied to clipboard
Preprocessor: deferred recursive macro expansion
Example taken from here: https://jadlevesque.github.io/PPMP-Iceberg/explanations#codeevaldefercode
#define EMPTY()
#define LOOP_INDIRECTION() LOOP
#define LOOP(x) x LOOP_INDIRECTION EMPTY()() (x)
LOOP(1)
clang and gcc expand this to 1 LOOP_INDIRECTION () (1)
aro expands it to 1 LOOP (1)