Hi,

On Wed, 5 Jul 2017, Patrick Pelissier wrote:

I think I found an issue in the preprocessor of tcc.The following program:

[...]
TEST3((INIT(KO)))    // ==> expect ok, get "error: macro 'KO' used
with too many args"

produces an error "error: macro 'KO' used with too many args"

Yikes!  My eyes bleed, who writes such pre-processor abominations?  ;-)

It's an interesting corner case that took some time to analyze. Basically we must not look ahead too far for '(' when looking at a token that could start a function-like macro invocation. But our implementation of "not too far" was wrong. Fixed in mob d8fdd38 .

I wasn't able to reduce the test case any further.

Yeah. In above commit the testcase I added contains some lines showing the problem already a bit earlier but not much.


Ciao,
Michael.

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

Reply via email to