Dealing with const and non-const arrays that are initialized as empty
Submitted by Raul Gutierrez Segales
Link to original bug (#656707)
Description
The following Vala code :
const string[] bad = {};
produces this C code:
static const gchar* bad[] = {};
whereas without const:
string[] good = {};
you get:
gchar** tmp0 = NULL;
which is a correctly initialized array of pointers.
We should either emit a warning stating that const string[] doesn't make sense or at least generate code in the form of :
static const gchar** bad = NULL;