From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8201deea80f1752a X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: 3-bit array ... Date: 1999/12/07 Message-ID: <384D4C8E.36174908@averstar.com>#1/1 X-Deja-AN: 557788107 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <382386fe.85782690@news.uswest.net> <384728ff.588431360@news.uswest.net> <3847EF64.EBD41169@callnetuk.com> <82hlkq$968$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-12-07T00:00:00+00:00 List-Id: Robert Dewar wrote: > > In article , > Robert A Duff 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