From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11026 invoked by alias); 17 Apr 2003 02:39:08 -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 11013 invoked from network); 17 Apr 2003 02:39:08 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by sources.redhat.com with SMTP; 17 Apr 2003 02:39:08 -0000 Received: from free.redhat.lsd.ic.unicamp.br (aoliva.cipe.redhat.com [10.0.1.10]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id h3H2c5V10408; Wed, 16 Apr 2003 22:38:06 -0400 Received: from free.redhat.lsd.ic.unicamp.br (free.redhat.lsd.ic.unicamp.br [127.0.0.1]) by free.redhat.lsd.ic.unicamp.br (8.12.8/8.12.8) with ESMTP id h3H2c5Y7023744; Wed, 16 Apr 2003 23:38:05 -0300 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.12.8/8.12.8/Submit) id h3H2c4jg023740; Wed, 16 Apr 2003 23:38:04 -0300 To: kenner@vlsi1.ultra.nyu.edu (Richard Kenner) Cc: rth@redhat.com, gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT References: <10304110200.AA04666@vlsi1.ultra.nyu.edu> From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Thu, 17 Apr 2003 05:39:00 -0000 In-Reply-To: <10304110200.AA04666@vlsi1.ultra.nyu.edu> 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/msg00809.txt.bz2 On Apr 10, 2003, kenner@vlsi1.ultra.nyu.edu (Richard Kenner) wrote: > Instead, it gets set from TYPE_USER_ALIGN, which seems wrong to me > because it doesn't properly distinguish (in any language) the cases > where an alignment is specified for a type vs. when its specified > for a decl. What I don't get is why such cases must be distinguished. I mean, if an alignment is specified by the user for a type, is it not true that the user is also specifying the alignment for any objects of that type, except when overridden for a specific object? It seems to me that this is the point of the change that propagates TYPE_USER_ALIGN to DECL_USER_ALIGN, and I can't see how this could possibly be incorrect. I mean, if it is not, then, given: typedef T foo __attribute__((aligned(N)); foo bar; foo baz __attribute__((aligned(N)); bar and baz might have different alignment requirements, which feels wrong to me. -- 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