mirror of
https://github.com/apache/nuttx.git
synced 2026-08-31 14:13:04 +00:00
* For C, wchar_t is provided by the OS. On NuttX, it's uint16_t. (Except wide character literals, which uses the compiler built-in knowledge of wchar_t.) * For C++, wchar_t is a built-in type. It's provided by the compiler. * The compilers built-in wchar depends on the compiler configuration. For the sim, the compilers are usually configured with wchar_t == int, which is 32-bit. * wchar_t should be compatible between C and C++. This commit fixes the mismatches by telling the compiler to use 16-bit wchar_t. An alternative is to make NuttX use 32-bit wchar_t if the compiler is configured with 32-bit wchar_t. It can increase the runtime footprint. While it might be ok for the sim, it might be a problem for real devices. |
||
|---|---|---|
| .. | ||
| sim/sim | ||