[Beremiz-devel] [MatIEC] too many elements in array initialization
if there are too many initialization elements for array, then iec2c
"Internal compiler error in file generate_c_vardecl.cc at line 249."
"Internal compiler error in file generate_c_vardecl.cc at line 304."
But the standard allows this. See 22.214.171.124 "Initial value assignment":
If the number of initial values given in the initialization list exceeds the number of array entries, the
excess (rightmost) initial values shall be ignored. If the number of initial values is less than the
number of array entries, the remaining array entries shall be filled with the default initial values for the
corresponding data type. In either case, the user shall be warned of this condition during preparation
of the program for execution.
I've changed a code so unused initialization elements are ignored (see
attached patch). But I couldn't find the way to get a good
understandable user warning in this case.