GNOME Bugzilla – Bug 648890
It's possible to attempt to use a value from a void expression, even though C doesn't allow this.
Last modified: 2011-04-30 15:46:20 UTC
To reproduce: 1) Compile the following Vala program: //---------------- void glitch(void *vp) { int i = (int)(*vp); stderr.printf("\ni = %d.\n", i); } int main() { int i = 4; glitch(&i); return 0; } //---------------- and observe the error returned from the C compiler. Observed: valac accepts this program, generating invalid C code (error: invalid use of void expression). Expected: valac displays an error message informing the user that trying to extract a value from a void expression is forbidden.
commit 19d32a9e196a0e78be1721c5add06cf6c8174f21 Author: Luca Bruno <lucabru@src.gnome.org> Date: Sat Apr 30 17:42:00 2011 +0200 Forbid pointer indirection for void type Fixes bug 648890. 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.