Detect more invalid initializers
commite6980f6cc7d1c311c4d3577993238eb667753249
authorMichael Matz <matz@suse.de>
Mon, 18 Mar 2019 02:26:19 +0000 (18 03:26 +0100)
committerMichael Matz <matz@suse.de>
Mon, 18 Mar 2019 02:31:11 +0000 (18 03:31 +0100)
treec5bed682de75f2bbc5084488807f334ff03de1e2
parentd72b877e45987b8869ceb6f86e126819b1bb3f41
Detect more invalid initializers

in presence of invalid source code we can't rely on the
next token to determine if we have or haven't already parsed
an initializer element, we really have to track it in some separate
state; it's a flag, so merge it with the other two we have (size_only
and first).  Also add some syntax checks for situations which
formerly lead to vstack leaks, see the added testcases.
tccgen.c
tests/tests2/60_errors_and_warnings.c
tests/tests2/60_errors_and_warnings.expect