From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21701 invoked by alias); 17 Apr 2003 20:25:16 -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 21669 invoked from network); 17 Apr 2003 20:25:15 -0000 Received: from unknown (HELO vlsi1.ultra.nyu.edu) (128.122.140.213) by sources.redhat.com with SMTP; 17 Apr 2003 20:25:15 -0000 Received: by vlsi1.ultra.nyu.edu (4.1/1.34) id AA10272; Thu, 17 Apr 03 16:29:29 EDT Date: Thu, 17 Apr 2003 21:40:00 -0000 From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner) Message-Id: <10304172029.AA10272@vlsi1.ultra.nyu.edu> To: aoliva@redhat.com Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT Cc: gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org X-SW-Source: 2003-04/txt/msg00866.txt.bz2 I hope not if this would change the layout of a structure containing a member with the specified alignment requirement. This is where propagating the user-requested alignment for a type into the field decl comes into play: by doing this, we make sure the alignment request is obeyed, regardless of whether it comes from the field decl or from its type. Yes, but this is precisely the case you have been asking to see: if you set the alignment of a type, you do *not* want a field of the type to be stricter aligned, but you don't care about an object. You *do* care about the object if you *also* specify an alignment for it, which is why you must distinguish between the two cases.