Vala allows incorrect array declaration
Submitted by Eric Gregory
Link to original bug (#665349)
Description
In Vala, you correctly create an array like this: int[] array = new int[5];
But let's say you accidentally do this: int array[] = new int[5];
Vala unfortunately allows this but creates invalid C code.
GCC returns the (confusing) error message in this case:
In function ‘_vala_main’: error: array size missing in ‘array’ error: incompatible types when assigning to type ‘gint[1]’ from type ‘gint *’ error: incompatible types when assigning to type ‘gint[1]’ from type ‘void *’ error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) make: *** [all] Error 1