From owner-freebsd-standards@FreeBSD.ORG Wed Jun 4 03:09:39 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0F5E37B401; Wed, 4 Jun 2003 03:09:38 -0700 (PDT) Received: from fafoe.dyndns.org (chello212186121237.14.vie.surfer.at [212.186.121.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 479A843FAF; Wed, 4 Jun 2003 03:09:38 -0700 (PDT) (envelope-from stefan@fafoe.dyndns.org) Received: from wombat.fafoe (wombat.fafoe [192.168.2.102]) by fafoe.dyndns.org (Postfix) with ESMTP id 0CB1840C1; Wed, 4 Jun 2003 12:09:35 +0200 (CEST) Received: by wombat.fafoe (Postfix, from userid 1001) id DCCE1D1; Wed, 4 Jun 2003 12:09:34 +0200 (CEST) Date: Wed, 4 Jun 2003 12:09:34 +0200 From: Stefan Farfeleder To: Tony Finch Message-ID: <20030604100934.GC584@wombat.fafoe> References: <20030603215322.31853.qmail@web13403.mail.yahoo.com> <20030603210338.A70533@espresso.bsdmike.org> <20030604083821.GM18938@chiark.greenend.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030604083821.GM18938@chiark.greenend.org.uk> User-Agent: Mutt/1.5.4i cc: "Pedro F. Giffuni" cc: freebsd-standards@FreeBSD.org cc: Mike Barcroft Subject: Re: GNU extensions on FreeBSD 5.x headers X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2003 10:09:39 -0000 On Wed, Jun 04, 2003 at 09:38:21AM +0100, Tony Finch wrote: > On Tue, Jun 03, 2003 at 09:03:38PM -0400, Mike Barcroft wrote: > > > > I think those of us who've played with alternative compilers are aware > > of this requirement. I'm not sure there's anything we can do about > > it. If anyone has any tricks to force 128-bit alignment without a > > 128-bit type in standard C, I'd love to hear it. > > Not in standard C (since it doesn't allow you to express alignment and > padding requirements), but in C-as-she-is-spoke why not insert the > necessary padding explicitly? By adding padding to a struct you can only align the offset of a struct member: struct foo { ... char padding[N]; bar aligned; ... }; What you cannot do with padding is to align a non-dynamically allocated object of type struct foo as in: struct foo f; There's no way I can see to guarantee that f.aligned is 128-bit aligned. Regards, Stefan