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,72340e997bfd5289 X-Google-Attributes: gid103376,public From: "James E. Hopper" Subject: Re: array size Date: 1999/12/11 Message-ID: <111219991626405236%hopperj@macconnect.com>#1/1 X-Deja-AN: 559504915 Content-Transfer-Encoding: 8bit References: <101219991605504828%hopperj@macconnect.com> <3852831a.0@news.pacifier.com> Organization: http://extra.newsguy.com Content-Type: text/plain; charset=ISO-8859-1 User-Agent: YA-NewsWatcher/4.2.3 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-12-11T00:00:00+00:00 List-Id: Steve, that pretty much answers my question about it being a bug in machten. the problem arose initially on solaris (it was sent to me as a question) and the machten port gives the same answer as the solaris port. but if NT gives the expected answer then there is possibly something wrong with gnat??? I will send it on to ACT THANKS! jim In article <3852831a.0@news.pacifier.com>, DuckE wrote: > Here's my results with GNAT 3.12p on Windows NT: > > ----------------- > Size of Frequency Type = 24 > > Length of Preset_Array_Type = 6 > Size of Preset array elems (Frequency_Type) * length of array = 144 > Size of Preset_Array_Type (per compiler- should match above calculation = > 144 > > Length of Day_Array_Type = 7 > Size of day array elems (Preset_Array _Type) * length of array = 1008 > Size of Day_Array_Type (per compiler- should match above calculation = 1008 > ------------------ > > It looks like this is what you were expecting. What's your host/target? > > SteveD > > James E. Hopper wrote in message > news:101219991605504828%hopperj@macconnect.com... > > the following program is a cut and paste from some code we are porting > > to gnat from vads. if some reason the type > > > > type Day_Array_Type is array ( Day_Type ) of Preset_Array_Type; > > pragma pack (Day_Array_Type); -- RAD SOLARIS PORT > > > > is not packing the array how i would expect. it appears to be padding > > each element with 2 bytes to align array elements on word boundries > > despite the pragma pack. using rep spec doesnt help because compiler > > spits it out as wrong size. > > > > any ideas??? > > > > thansk jim > [snip]