Closed
Description
opened on Mar 24, 2024
Currently, core::ffi::c_char on AIX is i8, but AFAIK, the default of this platform is unsigned (u8).
Defaults
-qchars=unsigned
Clang:
$ clang --version
Homebrew clang version 17.0.6
$ clang -E -dM -x c /dev/null -target powerpc64-ibm-aix | grep __CHAR_
#define __CHAR_BIT__ 8
#define __CHAR_UNSIGNED__ 1
Rust:
$ tail -2 src/lib.rs
const C: core::ffi::c_char = 0u8;
$ cargo check -Zbuild-std=core --target powerpc64-ibm-aix
error[E0308]: mismatched types
--> src/lib.rs:3972:30
|
3972 | const C: core::ffi::c_char = 0u8;
| ^^^ expected `i8`, found `u8`
|
help: change the type of the numeric literal from `u8` to `i8`
|
3972 | const C: core::ffi::c_char = 0i8;
| ~~
cc @ecnelises @bzEq (target maintainers)
Meta
rustc --version --verbose
:
rustc 1.79.0-nightly (2f090c30d 2024-03-23)
binary: rustc
commit-hash: 2f090c30ddd6b3bbe5c81c087579a5166e7c7278
commit-date: 2024-03-23
host: aarch64-apple-darwin
release: 1.79.0-nightly
LLVM version: 18.1.2
Activity