Macro expansion difference vs other preprocessors
Found this example here: https://marc.info/?l=boost&m=118835769257658&w=2
#define A(m) m( B(f)
#define B(x) A(x)
#define C(x) < x >
A(C) ) *
clang, GCC, MSVC, and tinycc output:
< f( B(f) > *
arocc output:
< A(f) > *
The post says that our output is correct; and that "Very very few preprocessors get this completely right". Not sure if this is a bug or not.
Assuming that the post and our expansion is correct it could be argued that this is a bug since we currently always emulate some other compiler and our behavior doesn't match. Did your preprocessor rewrite get far enough that you could test how it handles this?
Unfortunately not; I abandoned it because I wasn't able to find big enough chunks of time to work on it, so every time I came back to it I'd have to re-remember how preprocessors work. I might be able to take another try toward the end of the year.