GNOME Bugzilla – Bug 676977
invalid C code for array of nullable structs with initializer
Last modified: 2018-05-22 14:25:41 UTC
Created attachment 215135 [details] The offending Vala code The attached Vala code won't compile. The offending snippet is const OptionEntry?[] entries = { /* initializer */ }; valac exits with the error error: cc exited with status 256 There are also many errors of the form ** (valac:6762): CRITICAL **: vala_ccode_function_add_assignment: assertion `self != NULL' failed In the generated C code (also attached), you can see that the array "entries" is declared and initialized, but the individual elements of the array are never declared/initialized, so the C compiler gives the error error: ‘_tmp0_’ undeclared here (not in a function)
Created attachment 215136 [details] The generated C code valac generates this from the array_of_nullable_structs_issue.vala file
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/303.