tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] TCC crash with incorrect syntax in compound literal


From: Michael Matz
Subject: Re: [Tinycc-devel] TCC crash with incorrect syntax in compound literal
Date: Mon, 18 Mar 2019 03:45:32 +0100 (CET)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)

Hello,

On Sun, 17 Mar 2019, Pascal Cuoq wrote:

The attached patch makes the program above rejected without crash, does not seem to break “make test” (I think I know what it looks like when the tests are broken because my first fix did break them), and it makes the following program accepted too (and compiled to a binary that behaves as intended):

It might be close to the right fix.

It's not incorrect, but I chose to fix the problem differently on mob; sprinkling checks for wrong tokens here and there doesn't really fix the root cause: in presence of invalid source code we can't rely on the next token to determine if we have or haven't seen an initializer element already, we do need to track this explicitely.


Ciao,
Michael.

reply via email to

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