GNOME Bugzilla – Bug 609901
C compiler warning - assignment from incompatible pointer type
Last modified: 2013-04-30 07:14:20 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.
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.
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.