-
-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Zig Version
0.16.0-dev.1262+be4eaed7c
Steps to Reproduce and Observed Behavior
Environment
- Working version: 0.15.2
- Broken version: 0.16.0-dev.1262+be4eaed7c
- OS: 6.17.7-arch1-1 x86_64 GNU/Linux
Reproduction Code
const std = @import("std");
const c = @cImport({
@cInclude("stdlib.h");
});
pub fn main() void {
const a: c._Float64 = 123.0;
std.debug.print("test: a={any}\n", .{a});
}Error
$ anyzig 0.16.0-dev.1262+be4eaed7c build-exe main.zig -lc
anyzig: appdata '/home/happystraw/.local/share/anyzig'
anyzig: zig '0.16.0-dev.1262+be4eaed7c' already exists at '/home/happystraw/.cache/zig/p/N-V-__8AACSPoBQh7D0nqqtq72aWM7tvkTXBuFMu56bvRrUx'
main.zig:7:15: error: root source file struct 'cimport' has no member named '_Float64'
const a: c._Float64 = 123.0;
~^~~~~~~~~
.cache/zig/o/14c3f02c1a8b00b17580be8fbb6e5028/cimport.zig:1:1: note: struct declared here
pub const __builtin = @import("std").zig.c_translation.builtins;
^~~
referenced by:
callMain [inlined]: .cache/zig/p/N-V-__8AACSPoBQh7D0nqqtq72aWM7tvkTXBuFMu56bvRrUx/lib/std/start.zig:687:22
callMainWithArgs [inlined]: .cache/zig/p/N-V-__8AACSPoBQh7D0nqqtq72aWM7tvkTXBuFMu56bvRrUx/lib/std/start.zig:656:20
main: .cache/zig/p/N-V-__8AACSPoBQh7D0nqqtq72aWM7tvkTXBuFMu56bvRrUx/lib/std/start.zig:671:28
1 reference(s) hidden; use '-freference-trace=4' to see all referencesThis code compiles fine in Zig 0.15.2 but fails in 0.16.0-dev due to missing _Float64 type.
Expected Behavior
The code should compile and run successfully, as it did in Zig 0.15.2.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working