From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32565 invoked by alias); 18 Mar 2003 19:56:12 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 32486 invoked from network); 18 Mar 2003 19:56:11 -0000 Received: from unknown (HELO relay.hoga.pl) (193.178.241.61) by sources.redhat.com with SMTP; 18 Mar 2003 19:56:11 -0000 Received: from mail pickup service by relay.hoga.pl with Microsoft SMTPSVC; Tue, 18 Mar 2003 20:53:14 +0100 Received: from voltan ([217.99.236.93]) by smtp.hoga.pl with InfocitySMTPReceiver (16.04.2002); Tue, 18 Mar 2003 20:57:55 +0100 Message-ID: <001201c2ed88$899e8e00$5dec63d9@voltan> Importance: normal Priority: normal From: "Piotr Wyderski" To: References: <15991.15030.380667.367246@cuddles.cambridge.redhat.com> Subject: Re: __attribute__ ((aligned)) weirdness Date: Tue, 18 Mar 2003 20:24:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-OriginalArrivalTime: 18 Mar 2003 19:53:14.0546 (UTC) FILETIME=[033D0120:01C2ED88] X-SW-Source: 2003-03/txt/msg01214.txt.bz2 > So you have a field at offset 4. You ask for it to be 4-aligned, and > it jumps to offset 8. >=20 > What is going on? The alignment of x means that the offset of a variable is divisible by x with no remainder. Each y=3Dx*2^n (where n is natural) is a good alignment too, because f mod y =3D 0 =3D> f mod x =3D 0; 8-aligned field is also 4-aligned. So where's the problem? Best regards Piotr Wyderski Serwis www.logo.hoga.pl - sciagaj bajery na telefony Nokia, Siemens, Alcatel, Ericsson, Motorola,Samsung ------------------------------------------------------------ Promocja!!! rabat 40 % na zakup mks_vir 2003 dla klient=F3w Connect , kt=F3= rzy posiadaja kupony rabatowe.