From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14196 invoked by alias); 21 Apr 2003 16:26:32 -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 14182 invoked from network); 21 Apr 2003 16:26:32 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by sources.redhat.com with SMTP; 21 Apr 2003 16:26:32 -0000 Received: from localhost.localdomain (aoliva.cipe.redhat.com [10.0.1.10]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id h3LGQTV01144; Mon, 21 Apr 2003 12:26:30 -0400 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h3LGQTYY029975; Mon, 21 Apr 2003 13:26:29 -0300 Received: (from aoliva@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id h3LGQSRX029971; Mon, 21 Apr 2003 09:26:28 -0700 To: dewar@gnat.com (Robert Dewar) Cc: kenner@vlsi1.ultra.nyu.edu, rth@redhat.com, gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT References: <20030420022641.9A13AF28F4@nile.gnat.com> From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Mon, 21 Apr 2003 17:05:00 -0000 In-Reply-To: <20030420022641.9A13AF28F4@nile.gnat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-04/txt/msg00990.txt.bz2 On Apr 19, 2003, dewar@gnat.com (Robert Dewar) wrote: > In that case, you would specify an explicit alignment *for the > object*, which a compiler would take as a clear indication that > the alignment should not be increased. So if you turn: T i __attribute__((align(2))); T j __attribute__((align(2))); into typedef T T2 __attribute__((align(2))); T2 i, j; you say we could get different code? It sounds to me like they *should* be equivalent. The compiler can't tell whether the user meant the alignment of a type is meant for composites only or for factoring of attributes in object declarations. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer