From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4304 invoked by alias); 19 Aug 2019 14:12:16 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 4174 invoked by uid 89); 19 Aug 2019 14:12:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=complaining, asking, HX-Spam-Relays-External:ESMTPA X-HELO: resqmta-po-05v.sys.comcast.net Received: from resqmta-po-05v.sys.comcast.net (HELO resqmta-po-05v.sys.comcast.net) (96.114.154.164) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Aug 2019 14:12:14 +0000 Received: from resomta-po-12v.sys.comcast.net ([96.114.154.236]) by resqmta-po-05v.sys.comcast.net with ESMTP id zhgshWYLp5w82ziOKhfcq0; Mon, 19 Aug 2019 14:12:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1566223932; bh=zGkw2BqiPYk1Gazvd6wPiho0h/Gl3yv0pYpHOWnqmjc=; h=Received:Received:Content-Type:Mime-Version:Subject:From:Date: Message-Id:To; b=dOQn90aYG/9eJ3T/MQ8Yy/z8CqmTv7qHZ+duP9AWCDPZVw2jqRbckwBMjSHstWHKg eiy3Qm7mn6X0Q16xJ4ZUnu3SX016wjd2On0Oqd3Kc1KbWAZu291KLXMGiDK7LU8BkX oagvBNJispu40hNsJ1ka1N9vPttJxJyikJbzLmLzNw/19J+Y+Hg0T7AmLqzyQ44ha6 0+O+AQtxoeC0N8v5KCq6B86L3ivS4l9YvMhaef6rkyLpijDSHYK6Ezb0oD99B7UHiG QlKOKqZj3k8IqBRhHaSrvHgWodV2IUe3M9el2BRCGB6x8GPjg+zSzEgRQfQU+uIERx 0JQZAN3WP4Cyw== Received: from pkoning.akdesign.com ([73.60.223.101]) by resomta-po-12v.sys.comcast.net with ESMTPA id ziODhXYJqrMRYziOEh3Jyd; Mon, 19 Aug 2019 14:12:08 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgeduvddrudefledgjeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurheptggguffhjgffgffkfhfvofesthhqmhdthhdtvdenucfhrhhomheprfgruhhlucfmohhnihhnghcuoehprghulhhkohhnihhnghestghomhgtrghsthdrnhgvtheqnecukfhppeejfedriedtrddvvdefrddutddunecurfgrrhgrmhephhgvlhhopehpkhhonhhinhhgrdgrkhguvghsihhgnhdrtghomhdpihhnvghtpeejfedriedtrddvvdefrddutddupdhmrghilhhfrhhomhepphgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtpdhrtghpthhtoheprghmohhnrghkohhvsehishhprhgrshdrrhhupdhrtghpthhtoheprhhitghhrghrugdrvggrrhhnshhhrgifsegrrhhmrdgtohhmpdhrtghpthhtohepmhgrrhhkuhhssehmuhgsfhdruggvpdhrtghpthhtohepghgttgesghgttgdrghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedt X-Xfinity-VMeta: sc=-100;st=legit Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: asking for __attribute__((aligned()) clarification From: Paul Koning In-Reply-To: Date: Mon, 19 Aug 2019 14:12:00 -0000 Cc: "Richard Earnshaw (lists)" , =?utf-8?Q?Markus_Fr=C3=B6schle?= , gcc@gcc.gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <1E465204-0887-49CB-8472-196EDE7AAE81@comcast.net> <055f71a6-7b20-eb80-6f0a-d7572c34fa47@arm.com> To: Alexander Monakov X-SW-Source: 2019-08/txt/msg00139.txt.bz2 > On Aug 19, 2019, at 10:08 AM, Alexander Monakov wrot= e: >=20 > On Mon, 19 Aug 2019, Richard Earnshaw (lists) wrote: >=20 >> Correct, but note that you can only pack structs and unions, not basic t= ypes. >> there is no way of under-aligning a basic type except by wrapping it in a >> struct. >=20 > I don't think that's true. In GCC-9 the doc for 'aligned' attribute has b= een > significantly revised, and now ends with >=20 > When used as part of a typedef, the aligned attribute can both increase = and > decrease alignment, and specifying the packed attribute generates a warn= ing.=20 >=20 > (but I'm sure defacto behavior of accepting and honoring reduced alignmen= t on > a typedef'ed scalar type goes way earlier than gcc-9) Interesting. It certainly wasn't that way a decade ago. And for the old c= ode pattern to generate a warning seems like a bad incompatible change. Ho= noring reducing alignments is one thing, complaining about packed is not go= od. paul