General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
33.83k
stars
2.47k
forks
source link
C backend: pointer to array of non-simple value does not get emitted properly #21439
Open
torque opened 3 days ago
Zig Version
0.14.0-dev.1583+812557bfd
Steps to Reproduce and Observed Behavior
The output C file has something like this:
which causes the various C compilers I've tried (clang and gcc) to emit this error when attempting to compile the output:
Even though the value itself is a pointer, it seems the array declaration requires the element type to be fully-defined beforehand.
This behavior exists back to at least zig 0.11.0.
Expected Behavior
The emitted C code should contain the correctly resolved types.