|
发表于 2017-10-15 21:26:44
|
显示全部楼层
wchar_t 从V8.10开始默认是32位的了,之前是16位。
Changed size of wchar_t in version 8.10 and 8.11
Object files following the ARM ABI has a runtime attribute indicating the size of wchar_t.
In EWARM version 7.80 and earlier, the size of wchar_t was 2 bytes wide and the runtime attribute was set accordingly.
For EWARM version 8.10, the size of wchar_t was 4 bytes wide but the value of the runtime attribute was not updated. Thus in 8.10 code is generated with 4 byte wide wchar_t but the object file is marked as if wchar_t is 2 bytes wide.
In EWARM version 8.11 wchar_t is 4 bytes wide and the runtime attribute is set accordingly.
Looking only at the wchar_t aspect this has the following implications:
Combining object files built with 7.80 and 8.10 will not trigger any linker warning but if the application uses wchar_t, the behavior will be unpredictable.
Combining object files built with 8.10 and 8.11 will trigger a linker warning but the application should work even if it uses wchar_t.
Combining object files built with 7.80 and 8.11 will trigger a linker warning and if the application uses wchar_t, the behavior will be unpredictable.
|
|