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 609901 - C compiler warning - assignment from incompatible pointer type
C compiler warning - assignment from incompatible pointer type
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
0.7.x
Other Linux
: Normal trivial
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-14 08:26 UTC by Guenther Brunthaler
Modified: 2013-04-30 07:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This lets the C compiler show warnings (356 bytes, text/plain)
2010-02-14 08:26 UTC, Guenther Brunthaler
Details

Description Guenther Brunthaler 2010-02-14 08:26:39 UTC
Created attachment 153754 [details]
This lets the C compiler show warnings

When valac generates C code for the attachted source files, everything is fine and no warnings are displayed:

$ valac -C upval.vala

As soon as the generated C source code is compiled by gcc-4.3, however, the following warnings are displayed by the C compiler:

$ LC_ALL=C gcc -o upval `pkg-config --cflags --libs vala-1.0` upval.c
upval.c: In function 'gen':
upval.c:91: warning: assignment from incompatible pointer type
upval.c:92: warning: assignment from incompatible pointer type
upval.c:93: warning: assignment from incompatible pointer type

The contents of the 3 lines mentioned above is as follows:

        *v2set = (_tmp0_ = __lambda0__noargs_func, (((*v2set_target_destroy_notify) == NULL) ? NULL : (*v2set_target_destroy_notify) (*v2set_target), *v2set = NULL, *v2set_target = NULL, *v2set_target_destroy_notify = NULL), *v2set_target = block1_data_ref (_data1_), *v2set_target_destroy_notify = block1_data_unref, _tmp0_);
        *v3set = (_tmp1_ = __lambda1__noargs_func, (((*v3set_target_destroy_notify) == NULL) ? NULL : (*v3set_target_destroy_notify) (*v3set_target), *v3set = NULL, *v3set_target = NULL, *v3set_target_destroy_notify = NULL), *v3set_target = block1_data_ref (_data1_), *v3set_target_destroy_notify = block1_data_unref, _tmp1_);
        result = (_tmp2_ = __lambda2__noargs_func, *result_target = block1_data_ref (_data1_), *result_target_destroy_notify = block1_data_unref, _tmp2_);

I have been using valac 0.7.10.
Comment 1 zarevucky.jiri 2010-02-14 13:53:24 UTC
Please, do join the IRC channel or the mailing list and discuss possible issues you find. This particular problem has been known for as long as the Vala itself exists and is gradually and slowly being fixed.

I can see you are new to Vala. If you have any questions, you can ask, preferably on the IRC. My nickname is "jury", so if nobody answers your question, feel free to ping me directly.
Comment 2 Luca Bruno 2013-04-30 07:14:20 UTC
Can't reproduce anymore, iirc I've fixed this but I can't find the relevant commit.This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.