-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Description
Zig Version
0.11.0-dev.1580+a5b34a61a
Steps to Reproduce and Observed Behavior
const std = @import("std");
pub fn main() void {
const Cint = @Type(@typeInfo(c_int));
std.log.info("{} {} {}", .{ c_int == i32, Cint == c_int, Cint == i32 });
}
on linux amd64:
info: false false true
Expected Behavior
Not sure if this is intended. It is quite confusing.
- If this is intended, it should be documented.
- Or
c_int
andi32
has different internal type id, butc_int == i32
holds on amd64 targets andc_int == i16
holds on some embedded targets.