Hello again, On 17 Mar 2019, at 13:56, Pascal Cuoq <c...@trust-in-soft.com<mailto:c...@trust-in-soft.com>> wrote:
2) I noticed that a variant of the input I initially reported in this thread is still crashing TCC. The variant that still crashes TCC as of commit d72b877 is: void f(char *); void g(void) { f((char[]){1, ,}); } It is very similar to the previous input but this time there is a first element before the syntactically incorrect “, ,” in the compound literal. 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): #include <stdio.h> int main(void) { printf("%zu %s\n", sizeof (char[]){'a', 0,}, (char[]){'a', 0,}); } It might be close to the right fix. Pascal
comma_comma.patch
Description: comma_comma.patch
_______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel