tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Preprocessing issue?


From: Michael Matz
Subject: Re: [Tinycc-devel] Preprocessing issue?
Date: Sun, 9 Jul 2017 05:39:48 +0200 (CEST)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]