AFAICT wchar_t
is always 32-bit wide on Apple targets.
What is the sign of wchar_t
on:
- x86 Apple Darwin (32-bit MacOSX)
- x86_64 Apple Darwin (64-bit MacOSX)
- ARM iOS (32-bit)
- AArch64 iOS (64-bit)
?
ISO/IEC 9899:2017 §7.20.3/4:
If
wchar_t
(see 7.19) is defined as a signed integer type, the value ofWCHAR_MIN
shall be no greater than −127 and the value ofWCHAR_MAX
shall be no less than 127; otherwise,wchar_t
is defined as an unsigned integer type, and the value ofWCHAR_MIN
shall be 0 and the value ofWCHAR_MAX
shall be no less than 255.
So looking at WCHAR_MIN
will tell you.
In iOS, as with other Darwin platforms, both
char
andwchar_t
are signed types.