GNOME Bugzilla – Bug 701885
Error with identifying names _tmpx_ (_tmp0_, _tmp1_ etc)
Last modified: 2018-02-19 09:09:08 UTC
The following program will not compile: int main(string[] args) { int _tmp0_, _tmp1_; _tmp0_ = -5; _tmp1_ = -(_tmp0_); stdout.printf("|%d| = %d\n", _tmp0_, _tmp1_); return 0; } Errors: $ valac main.vala /tmp/main.vala.c: In function ‘_vala_main’: /tmp/main.vala.c:21:8: error: conflicting types for ‘_tmp0_’ FILE* _tmp0_; ^ /tmp/main.vala.c:19:7: note: previous definition of ‘_tmp0_’ was here gint _tmp0_ = 0; ^ /tmp/main.vala.c:22:9: warning: assignment makes pointer from integer without a cast [enabled by default] _tmp0_ = -5; ^ /tmp/main.vala.c:23:11: error: wrong type argument to unary minus _tmp1_ = -_tmp0_; ^ /tmp/main.vala.c: In function ‘main’: /tmp/main.vala.c:32:2: warning: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations] g_type_init (); ^ error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) Should at least be noted that the documentation ...
*** This bug has been marked as a duplicate of bug 729255 ***