After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 623857 - Invalid array declaration syntax is not handled as an error
Invalid array declaration syntax is not handled as an error
Status: RESOLVED DUPLICATE of bug 641308
Product: vala
Classification: Core
Component: Arrays
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-08 16:50 UTC by pancake
Modified: 2017-03-09 20:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description pancake 2010-07-08 16:50:05 UTC
As discussed in mailing list http://mail.gnome.org/archives/vala-list/2010-July/msg00043.html

$ cat a.vala
#!/usr/bin/vala
void main () {
        // uint8[] foo = new uint8[16]; // OK
        uint8 foo[] = new uint8[16]; // FAIL
        print("%d\n", foo[0]);
}

$ vala a.vala
/tmp/a.vala.LDAGFV.c: In function '_vala_main':
/tmp/a.vala.LDAGFV.c:16:9: error: array size missing in '_tmp0_'
/tmp/a.vala.LDAGFV.c:19:9: error: array size missing in 'foo'

/tmp/a.vala.LDAGFV.c:20:16: error: incompatible types when assigning to type 'guint8[1]' from type 'guint8 *' /tmp/a.vala.LDAGFV.c:20:6: error: incompatible types when assigning to type 'guint8[1]' from type 'guint8 *' /tmp/a.vala.LDAGFV.c:22:6: error: incompatible types when assigning to type 'guint8[1]' from type 'void *'

error: cc exited with status 256
Comment 1 Rico Tzschichholz 2017-03-09 20:51:42 UTC

*** This bug has been marked as a duplicate of bug 641308 ***