Zig Version
0.14.0-dev.2587+f57a7458b
Steps to Reproduce and Observed Behavior
A minimal example:
fn awd() void {}
pub fn main() void {
@as(*const fn (u32) void, @ptrCast(&awd))(1);
}
Quoted from the generated non-compilable C code:
static void test_awd__224(void) {
return;
}
static void test_main__225(void) {
/* file:2:59 */
test_awd__224(UINT32_C(1));
return;
}
See also #22368 (comment)
Expected Behavior
The generated C code includes the function pointer conversion and can be compiled by C compiler.
Zig Version
0.14.0-dev.2587+f57a7458b
Steps to Reproduce and Observed Behavior
A minimal example:
Quoted from the generated non-compilable C code:
See also #22368 (comment)
Expected Behavior
The generated C code includes the function pointer conversion and can be compiled by C compiler.