pub fn cCharSignedness(target: *const Target) ?std.builtin.Signedness {
switch (target.os.tag) {
.opengl => return null,
else => {},
}
if (target.os.tag.isDarwin() or target.os.tag == .windows or target.os.tag == .uefi) return .signed;
return switch (target.cpu.arch) {
.aarch64,
.aarch64_be,
.arm,
.armeb,
.arc,
.arceb,
.csky,
.ez80,
.hexagon,
.msp430,
.powerpc,
.powerpcle,
.powerpc64,
.powerpc64le,
.s390x,
.riscv32,
.riscv32be,
.riscv64,
.riscv64be,
.thumb,
.thumbeb,
.xcore,
.xtensa,
.xtensaeb,
=> .unsigned,
else => .signed,
};
}
Default signedness of
charfor the native C compiler for this target Note that char signedness is implementation-defined and many compilers provide an option to override the default signedness e.g. GCC's -funsigned-char / -fsigned-char Returnsnullif no C ABI is defined for this target.