This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rli->unpadded_align


On Wed, 26 Mar 03 10:02:07 EST, kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner) wrote:

>     I don't understand the purpose of this field.  It seems to be the same as
>     rli->record_align, except that it skips the effects of
>     BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN.  Is that actually the
>     intention?  If so, why?
>
> Yes, because of desires to be able to lay out records differently for Ada.

Differently how?

>     Hmm, looking at the ada frontend, it seems that you always set
>     DECL_ALIGN to TYPE_ALIGN, and rely on layout_decl to reduce the
>     alignment as appropriate.  But that shouldn't make any difference to
>     rli->unpadded_align; it will still be reflected in DECL_ALIGN.
>
> I'm not 100% certain at this time that this field is actually still used:
> that code has changed around a number of times.  I need to spend some time
> in the next month or so taking another look at various alignment issues
> here and will be reviewing this code at that time.

I'm reviewing it right now; I'm trying to move all the code for determining
the alignment of a field into layout_decl so that the value of DECL_ALIGN
actually reflects the field alignment.  But that looks like it will change
the value of rli->unpadded_align, and I'd like to know how (if) I need to
adjust the code to accomodate Ada.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]