From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10487 invoked by alias); 4 Jun 2014 17:15:34 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 10441 invoked by uid 48); 4 Jun 2014 17:15:28 -0000 From: "ilya.konstantinov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/61413] New: __ARM_SIZEOF_WCHAR_T is constant 32 -- should be 4 or 2 Date: Wed, 04 Jun 2014 17:15:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ilya.konstantinov at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-06/txt/msg00311.txt.bz2 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