From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6F29E385E00B; Thu, 26 Mar 2020 17:50:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F29E385E00B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585245005; bh=R7co42SQfexelRSU1nALoSfdJbLKKs0qzZFbiO3njHE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=T47qfO3MPXFQ/j70mY1gs6y3L3oQBFIqHG+q5VeEfOkPJnTCdGeKmIx8vlZF6OAbW sVKIhA0S3DOkxV9o+1ImgxPEOGcwWqrv1tR+t0/OIGsRozqsYZPVI3xAuYoASxHs3W gCqaNUcgUqgWugUmqBCYUcDkfKJ4OJ16mwYD2x0k= From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/94338] struct member alignment is not carried over to alignment of struct variable Date: Thu, 26 Mar 2020 17:50:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 9.2.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com 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: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 17:50:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94338 --- Comment #3 from joseph at codesourcery dot com --- It's a mistake to be referring to the C standard for the interpretation of= =20 alignment attributes. The C standard way of specifying alignment is=20 _Alignas, not __attribute__, and if you write equivalent code using=20 _Alignas you get an error "error: '_Alignas' specifiers cannot reduce=20 alignment of 'A'", which corresponds to the constraint "The combined=20 effect of all alignment specifiers in a declaration shall not specify an=20 alignment that is less strict than the alignment that would otherwise be=20 required for the type of the object or member being declared.".=