Hi,

On Fri, 11 Mar 2016, Michael Matz wrote:

This whole thing also points out some deficiencies of tcc to emit error messages. For instance it accepts the initialization

void f(void) {
 struct w q = {"bugs", { 'c' } };
}

(and sets ref->c to 1), even though this is a non-static initialization, which is wrong (but the size adjustments needs also to be done for static initialization).

And even that is only a GCC extension. One isn't allowed to initialize flex array members, only via malloc and assignments. (But the GCC extension is probably quite prevalent as GCC doesn't even warn about it in conformant mode.


Ciao,
Michael.

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to