> then tcc output is OK. I used gcc 3.4.6 and 4.1.2 to test. May be new
> versions of the gcc behave like tcc.

The C standard has a somewhat unclear description of how the
preprocessor should work, but there is general agreement about what
was intended, and the general agreement leaves no real option for
alternative behaviour. Therefore, if two modern C compilers preprocess
differently, then one of them is buggy... I think it's TCC that is
buggy in this case. Has TCC always had this bug, or was it introduced
recently?

Simplified test case:

#define Y(x) Z(x)
#define X Y
X(X(foo))

Or:

#include <stdio.h>
int Z(int x) { return x + 1; }
#define Y(x) Z(x)
#define X Y
int main() { printf("%d\n", X(X(1))); return 0; }

Edmund

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to