From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0168D3858D32; Mon, 8 Apr 2024 00:34:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0168D3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712536467; bh=ysaF3qrTZc6/DZ/bYWw3+Fpo7mp4+6rMqCndgfmG+Ug=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BzbRq+evSWBfGY80RU/97ST2rzc4BTIMO9jep1JK6X7zmOYLAkK+zupB0l2bOJl1I pNmXOkgReyl6SINIv2bUpSDVtwE7QNHf+0JCxLtzAgX7tqOsXu5dwtv5qEjDUoMriY 86GHmxyEtrKtGSR92XqbFZzsKpW9Xvvlx9Unu/iY= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/60157] adding -mstrict-align for i386 and x86_64 architecture Date: Mon, 08 Apr 2024 00:34:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.4.6 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: keywords Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60157 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic --- Comment #1 from Andrew Pinski --- >-mstrict-align Will not help in this case really as GCC does not warn. Note clang does warn with -mstrict-align though: ``` :15:18: warning: field C within 'cond_mutex_t' is less aligned than 'pthread_cond_t' and is usually due to 'cond_mutex_t' being packed, which c= an lead to unaligned accesses [-Wunaligned-access] 15 | pthread_cond_t C; | ^ ``` But I suspect GCC should warn even without strict alignment really.=