GNOME Bugzilla – Bug 471244
C code generator doesn't take any dependencies into account
Last modified: 2009-03-30 22:36:06 UTC
Please describe the problem: The vala compiler bails out when the following piece of code is compiled: class A : B { } class B { } with the following error messages: test.c:19: error: field 'parent' has incomplete type test.c:23: error: field 'parent' has incomplete type error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) This is because the B and BClass structs are already used before they are declared. This is because C uses a single pass compiler. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Strange thing is: it only happens with Vala from SVN; not 0.1.2.
Confirming, happens with trunk and 0.1.2 here.
Created attachment 95439 [details] Test case
Comment on attachment 95439 [details] Test case Appears to be fixed in SVN rev 600
This is still broken in trunk.
*** Bug 511864 has been marked as a duplicate of this bug. ***
*** Bug 530063 has been marked as a duplicate of this bug. ***
Jürg, I'm still running vala with the patch I've attached in Bug 530063. Otherwise my code does not compile. I'm surprised to see that this bug has severity minor and priority low. Jaap
*** Bug 548284 has been marked as a duplicate of this bug. ***
*** Bug 549678 has been marked as a duplicate of this bug. ***
*** Bug 539892 has been marked as a duplicate of this bug. ***
*** Bug 543873 has been marked as a duplicate of this bug. ***
commit 2d4a4a264677b42710914907f63e1624e25e560f Author: Jürg Billeter <j@bitron.ch> Date: Tue Mar 31 00:31:07 2009 +0200 Rework header file generation Generate single C header file for public API, do not use header files for internal API. Fixes bug 471244, bug 571037, bug 572536, and bug 575629.