https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61413
Bug ID: 61413 Summary: __ARM_SIZEOF_WCHAR_T is constant 32 -- should be 4 or 2 Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: ilya.konstantinov at gmail dot com ARM EABI mandates __ARM_SIZEOF_WCHAR_T that reflects the wchar size: "wchar_t may be 2 or 4 bytes. The predefined macro __ARM_SIZEOF_WCHAR_T should be defined as the same number." [1] However, on gcc we have the following built-in defines: #define __ARM_SIZEOF_WCHAR_T 32 while it should be: #define __ARM_SIZEOF_WCHAR_T 4 or with -fshort-wchar: #define __ARM_SIZEOF_WCHAR_T 2 [1] http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053b/IHI0053B_arm_c_language_extensions_2013.pdf