> was able to reduce the test case to the code below. Maybe it's
> possible to resolve the compiler bug with this.
> struct{int c[1];} cases[] = {((int)0)};

A problem is with the initialization of the array inside struct:
A rigth form:
  struct{int c[1];} cases[] = { {((int)0)}  };
                                          ^         ^
An accepted form:
struct{int c[1];} cases[] = { (int)0  };

A code which handles this is inside tccgen.c (search "par_count").
This code assume that ')' must end before an initializer value. There
is a comment:
/* XXX: this test is incorrect for local initializers
           beginning with ( without {. It would be much more difficult
           to do it correctly (ideally, the expression parser should
           be used in all cases) */

=> tcc can not handle such case and It would be much more difficult to
do it correctly

Is it possible to correct  a open j code to place the array
initializers inside "{}" ?

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

Reply via email to