From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5117 invoked by alias); 10 Apr 2003 21:32:07 -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 5096 invoked from network); 10 Apr 2003 21:32:06 -0000 Received: from unknown (HELO desire.geoffk.org) (12.235.88.42) by sources.redhat.com with SMTP; 10 Apr 2003 21:32:06 -0000 Received: (from geoffk@localhost) by desire.geoffk.org (8.11.6/8.11.6) id h3ALV5920810; Thu, 10 Apr 2003 14:31:05 -0700 X-Authentication-Warning: desire.geoffk.org: geoffk set sender to geoffk@geoffk.org using -f To: kenner@vlsi1.ultra.nyu.edu (Richard Kenner) Cc: gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT References: <10304102056.AA02451@vlsi1.ultra.nyu.edu> From: Geoff Keating Date: Thu, 10 Apr 2003 21:41:00 -0000 In-Reply-To: <10304102056.AA02451@vlsi1.ultra.nyu.edu> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-04/txt/msg00472.txt.bz2 kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes: > Is it not true in Ada that if something is a particular type, then > it has the properties (including alignment) of that type? > > This is the terminology point that Robert alluded to. If something > has an alignment of 64 bits, it *also* has an alignment of 32 bits and > of 16 bits, etc. So an object that is aligned to 64 bits and is of a > type that is aligned to 32 bits *has* "the properties (including > alignment)" of its type. So, what you actually want to do is to set the alignment of the object to be *more* aligned than its type? Or, to phrase it another way, you want the object to be of a type which is more aligned than its declared type? -- - Geoffrey Keating