@@ -116,7 +116,6 @@ mod c_char_definition {
116
116
// Section 2.1 "Basic Types" in MSP430 Embedded Application Binary
117
117
// Interface says "The char type is unsigned by default".
118
118
// https://www.ti.com/lit/an/slaa534a/slaa534a.pdf
119
- // Note: this doesn't seem to match Clang's default (https://github.com/rust-lang/rust/issues/129945).
120
119
// powerpc/powerpc64:
121
120
// - PPC32 SysV: "Table 3-1 Scalar Types" in System V Application Binary Interface PowerPC
122
121
// Processor Supplement says ANSI C char is unsigned byte
@@ -139,8 +138,10 @@ mod c_char_definition {
139
138
// https://github.com/IBM/s390x-abi/releases/tag/v1.6.1
140
139
// - z/OS: XL C/C++ Language Reference says: "By default, char behaves like an unsigned char."
141
140
// https://www.ibm.com/docs/en/zos/3.1.0?topic=specifiers-character-types
142
- // Xtensa:
143
- // - "The char type is unsigned by default for Xtensa processors."
141
+ // xtensa:
142
+ // Section 2.17.1 "Data Types and Alignment" of Xtensa LX Microprocessor Overview handbook
143
+ // says "`char` type is unsigned by default".
144
+ // https://loboris.eu/ESP32/Xtensa_lx%20Overview%20handbook.pdf
144
145
//
145
146
// On the following operating systems, c_char is signed by default, regardless of architecture.
146
147
// Darwin (macOS, iOS, etc.):
@@ -150,11 +151,12 @@ mod c_char_definition {
150
151
// Windows MSVC C++ Language Reference says "Microsoft-specific: Variables of type char
151
152
// are promoted to int as if from type signed char by default, unless the /J compilation
152
153
// option is used."
153
- // https://learn.microsoft.com/en-us/cpp/cpp/fundamental-types-cpp?view=msvc-170#character-types)
154
- // L4RE :
154
+ // https://learn.microsoft.com/en-us/cpp/cpp/fundamental-types-cpp?view=msvc-170#character-types
155
+ // L4Re :
155
156
// The kernel builds with -funsigned-char on all targets (but useserspace follows the
156
157
// architecture defaults). As we only have a target for userspace apps so there are no
157
- // special cases for L4RE below.
158
+ // special cases for L4Re below.
159
+ // https://github.com/rust-lang/rust/pull/132975#issuecomment-2484645240
158
160
if #[ cfg( all(
159
161
not( windows) ,
160
162
not( target_vendor = "apple" ) ,
@@ -166,8 +168,8 @@ mod c_char_definition {
166
168
target_arch = "msp430" ,
167
169
target_arch = "powerpc" ,
168
170
target_arch = "powerpc64" ,
169
- target_arch = "riscv64" ,
170
171
target_arch = "riscv32" ,
172
+ target_arch = "riscv64" ,
171
173
target_arch = "s390x" ,
172
174
target_arch = "xtensa" ,
173
175
)
0 commit comments