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 664412 - Wrong C code generated for arrays in async methods
Wrong C code generated for arrays in async methods
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Code Generator: GAsync
0.14.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on: 641308
Blocks:
 
 
Reported: 2011-11-20 11:17 UTC by zub
Modified: 2018-05-22 14:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase demonstrating the issue. (159 bytes, text/x-vala)
2011-11-20 11:17 UTC, zub
Details
Log showing the errors I get with vala 16fa519730b7b0a4df65179e94b75678371fb361. (1.08 KB, text/x-log)
2011-11-20 11:18 UTC, zub
Details

Description zub 2011-11-20 11:17:46 UTC
Created attachment 201734 [details]
Testcase demonstrating the issue.

Some forms of array usage in async methods generates wrong C code.

I'm not sure which of the following is actually legal inside async method:

int[1] a = { -1 }; // compiles ok
int b[1] = { -1 }; // cc error
int c[] = { -1 }; // cc error

but all are accepted by valac, while the later two then fail at the C compilation stage.

The issue is reproducible on vala git 16fa519730b7b0a4df65179e94b75678371fb361, but also on an ancient vala in debian repo (0.12.1).

Testcase is attached. As I said, I'm not sure what all is actually legal inside an async method, but if the code is not legal, valac should report appropriate error.
Comment 1 zub 2011-11-20 11:18:35 UTC
Created attachment 201735 [details]
Log showing the errors I get with vala 16fa519730b7b0a4df65179e94b75678371fb361.
Comment 2 geert jordaens 2012-08-23 06:37:39 UTC
Duplicate of #Bug623857?
Comment 3 Jürg Billeter 2012-08-23 06:43:35 UTC
(In reply to comment #2)
> Duplicate of #Bug623857?

The issue 'b' appears to be specific to async methods and thus, is not a duplicate of bug 623857.
Comment 4 GNOME Infrastructure Team 2018-05-22 14:14:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/252.