-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
c_char signedness doesn't match with Clang's default on various no-std and tier 3 targets #129945
Copy link
Copy link
Closed
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)C-bugCategory: This is a bug.Category: This is a bug.O-AArch64Armv8-A or later processors in AArch64 modeArmv8-A or later processors in AArch64 modeO-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateO-androidOperating system: AndroidOperating system: AndroidO-bare-metalTarget: Rust without an operating systemTarget: Rust without an operating systemO-cskyTarget: glaCSKY above covers over me~Target: glaCSKY above covers over me~O-hermitOperating System: HermitOperating System: HermitO-illumosthe other shiny OSthe other shiny OSO-msp430O-riscvTarget: RISC-V architectureTarget: RISC-V architectureO-xtensaT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)C-bugCategory: This is a bug.Category: This is a bug.O-AArch64Armv8-A or later processors in AArch64 modeArmv8-A or later processors in AArch64 modeO-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateO-androidOperating system: AndroidOperating system: AndroidO-bare-metalTarget: Rust without an operating systemTarget: Rust without an operating systemO-cskyTarget: glaCSKY above covers over me~Target: glaCSKY above covers over me~O-hermitOperating System: HermitOperating System: HermitO-illumosthe other shiny OSthe other shiny OSO-msp430O-riscvTarget: RISC-V architectureTarget: RISC-V architectureO-xtensaT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
As an next step of #122985 ("c_char on AIX should be u8"), I checked all builtin targets' c_char (as of nightly-2024-09-03) using the following script.
check_c_char.sh
The result (stdout of the script) is:
stderr of the script (version info, etc.)
Note about the above script (potential false positive / false negative)
m68k-unknown-linux-gnu: can't compile functions with certain return types #89498) are ignored in the above script. (potential false negative)As stated in the title, there are many
target_os = "none" targetand tier3 targets that do not match.target_os = "none" target, most of them probably do not match with Clang's default.c_charwas originally defined instdand this mismatch was missed when it was moved tocore.c_chardirectly on these targets, but this includes a lot of tier 2 targets, so changing this to match Clang could have a not small impact on embedded ecosystem.References:
chardata type is unsigned."chartype is unsigned by default".@rustbot label +A-abi +O-Arm +O-AArch64 +O-riscv +O-csky +O-msp430 +O-xtensa +O-bare-metal +O-android +O-illumos +O-hermit