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 664392 - in async functions local variable in separate blocks conflict
in async functions local variable in separate blocks conflict
Status: RESOLVED DUPLICATE of bug 596861
Product: vala
Classification: Core
Component: Async
0.14.x
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-11-19 22:00 UTC by Łukasz Pankowski
Modified: 2011-11-20 10:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
simple example of the bug (91 bytes, application/octet-stream)
2011-11-19 22:00 UTC, Łukasz Pankowski
Details

Description Łukasz Pankowski 2011-11-19 22:00:18 UTC
Created attachment 201721 [details]
simple example of the bug

atached example where in two blocks the same variable name is used in a async method
this generate invalid C code where the same name is used twice in the structure holding
variables of async method. You can see the error message of compilation of blocks.vala:

$ valac --pkg gio-2.0 blocks.vala 
blocks.vala:3.11-3.11: warning: local variable `i' declared but never used
    { int i; }
          ^
blocks.vala:4.11-4.11: warning: local variable `i' declared but never used
    { int i; }
          ^
/home/lupan/src/sidle/blocks.vala.c:17:7: error: duplicate member ‘i’
error: cc exited with status 256
Compilation failed: 1 error(s), 2 warning(s)
Comment 1 Luca Bruno 2011-11-20 10:17:43 UTC
Thanks for taking the time to report this bug.
This particular bug has already been reported into our bug tracking system, but we are happy to tell you that the problem has already been fixed. It should be solved in the next software version. You may want to check for a software upgrade.

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