From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4560 invoked by alias); 23 Apr 2003 19:13:24 -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 4276 invoked from network); 23 Apr 2003 19:13:21 -0000 Received: from unknown (HELO ns2.uk.superh.com) (193.128.105.170) by sources.redhat.com with SMTP; 23 Apr 2003 19:13:21 -0000 Received: from sh-uk-ex01.uk.w2k.superh.com (sh-uk-ex01 [192.168.16.17]) by ns2.uk.superh.com (8.11.6+Sun/8.11.6) with ESMTP id h3NJCTa28009; Wed, 23 Apr 2003 20:12:29 +0100 (BST) Received: from superh.com ([192.168.17.40]) by sh-uk-ex01.uk.w2k.superh.com with Microsoft SMTPSVC(5.0.2195.5329); Wed, 23 Apr 2003 20:13:25 +0100 Message-ID: <3EA6E55A.2350F8DA@superh.com> Date: Wed, 23 Apr 2003 19:34:00 -0000 From: Joern Rennecke Organization: SuperH UK Ltd. X-Accept-Language: en MIME-Version: 1.0 To: Jamie Lokier CC: Andreas Schwab , Andrew Haley , Jason Merrill , gcc@gcc.gnu.org Subject: Re: On alignment Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Apr 2003 19:13:25.0668 (UTC) FILETIME=[6A3A2640:01C309CC] X-SW-Source: 2003-04/txt/msg01176.txt.bz2 > For the same reason, "struct foo { double x; }" as a standalone > variable should have alignment 8, not 4. Andrew's test shows it has > an alignment of 4. Well, what about struct bar { double x; int y; double z; } ? giving it an alignment of 8 doesn't improve things, as one double will always be misaligned. OTOH it is odd to have a lower alignment for bar than for foo, even though the start of bar has the same structure as the entirety of foo. -- -------------------------- SuperH (UK) Ltd. 2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX T:+44 1454 465658