On Tue, 27 Mar 2012, Eric Botcazou wrote:

> > Btw, I put things in stor-layout.c exactly to allow a langhook
> > eventually controlling things for the bitfield representative.
> > Mind adding one that simply disables them completely for Ada?
> > Or maybe, for selected record types, so that we do
> >
> >   if (lang_hooks.types.lower_bitfield_layout (rli->t))
> >     finish_bitfield_layout (rli->t);
> >
> > ?  Letting the FE decide when to punt is certainly better than
> > trying to figure it out from stor-layout.c code.  I suppose
> > for types that are supposed to interoperate with C / C++ using
> > the C / C++ rules makes sense (I suppose there is sth like
> > C/C++ interoperability with Ada).
> Yes, there is C/C++ interoperability in Ada.  But GNAT's policy is to be 
> compatible with C/C++ by default, so I'd rather not deviate from the common 
> code for such a central thing as record layout if we can avoid it.

I see.  Though the code does not affect layout but only access "layout"
for bitfields.  I'm fine with fixing the issues we run into elsewhere,
just the langhook is a possibility I had in mind from the start, in
case frontends differ in their memory model for bitfields.


Reply via email to