comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: 3-bit array ...
Date: 1999/12/07
Date: 1999-12-07T00:00:00+00:00	[thread overview]
Message-ID: <384D4C8E.36174908@averstar.com> (raw)
In-Reply-To: 82hlkq$968$1@nnrp1.deja.com

Robert Dewar wrote:
> 
> In article <wccg0xgm5n4.fsf@world.std.com>,
>   Robert A Duff <bobduff@world.std.com> wrote:
> > GNAT has always
> > supported packing to the 3-bit level.  AverStar's front end,
> and the
> > Green Hills compiler that uses AverStar's FE, used to use 4,
> but now
> > uses 3, due to customer demand for it.  That's what this whole
> > discussion has been about.
> >
> > There's also the issue of whether you can say:
> >
> >     for T2'Component_Size use 3;
> >
> > instead of the pragma Pack above.
> 
> I must say I wonder if the GNAT (and now Averstar) decision is
> the right one. It would have been cleaner to say Pack always
> means 4, and you use a component size clause if you want 3.

Bob mis-spoke.  We only pack to "odd-ball" sizes if the user
explicitly requests it via a 'Component_Size clause.  This
is important because there is existing Ada 95 code which we didn't
want to suddenly change behavior in a potentially surprising way.

> But the gods of legacy Ada 83 code definitely demand significant
> sacrifices, so this is one of them.

We chose to force these "legacy" users to put in a 'Component_Size clause
if they really need the 3-bit (in)efficiency.

> Bob, how far did Averstar go, did you just do 3 bits? In GNAt
> we close pack all sizes up to 64. (e.g. an array of Natural
> gets packed to 31, which can be quite a surprise, although the
> pragma Pack in this case is junk!)

We support any "odd-ball" 'component_size up to the maximum integer 
size supported by the compiler on the target.  That varies, from 24 
bits up to 64 bits.

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA




  reply	other threads:[~1999-12-07  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-06  0:00 3-bit array porting problem from ADA83 to GreenHills ADA95 Darrell Higgins
1999-11-05  0:00 ` Jeff Creem
1999-11-06  0:00   ` Darrell Higgins
1999-11-06  0:00 ` Robert Dewar
1999-11-09  0:00 ` Steve Mossom
1999-11-09  0:00   ` Robert Dewar
1999-11-10  0:00 ` Gleason
1999-11-10  0:00   ` Ted Dennison
1999-11-10  0:00     ` David Botton
1999-11-12  0:00       ` Robert Dewar
1999-11-12  0:00         ` Preben Randhol
1999-11-14  0:00         ` David Botton
1999-11-13  0:00 ` Darrell Higgins
1999-12-03  0:00 ` Darrell Higgins
1999-12-02  0:00   ` Robert C. Leif, Ph.D.
1999-12-04  0:00     ` Robert Dewar
1999-12-03  0:00   ` 3-bit array Nick Roberts
1999-12-05  0:00     ` Gisle S�lensminde
1999-12-06  0:00     ` Robert A Duff
1999-12-06  0:00       ` Tucker Taft
1999-12-07  0:00       ` Robert Dewar
1999-12-07  0:00         ` Tucker Taft [this message]
1999-12-08  0:00           ` Robert Dewar
1999-12-08  0:00           ` Robert C. Leif, Ph.D.
1999-12-07  0:00         ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox