From: holsti@cs.Helsinki.FI (Niklas Holsti)
Subject: Re: Ada Portability... NOT!
Date: 21 Nov 1994 05:06:37 GMT
Date: 1994-11-21T05:06:37+00:00 [thread overview]
Message-ID: <3ap9st$1mv@hydra.Helsinki.FI> (raw)
In-Reply-To: 199411182104.PAA04854@mail.cs.utexas.edu
In <199411182104.PAA04854@mail.cs.utexas.edu>
britt@molokai.46tg.af.mil (Capt. Britt Snodgrass) writes:
>One recent post contained what I considered an overstatement of the
>portability of Ada programs. Let me describe my current problem and
>hopefully many of you will provide some insight into the root cause.
I have reordered the following snippets of the error report.
It seems there are two record types called ICD_IRG_010_Channel_Type
and ICD_IRG_Corrected_Input_Type. The latter has several components
of the former type:
> Channel1 : ICD_IRG_010_Channel_Type;
> Channel2 : ICD_IRG_010_Channel_Type;
...
There is a record representation clause specifying the byte locations
of the components:
> for ICD_IRG_010_Corrected_Input_Type use
> record at mod 8;
> tBlock at 0 range 0..63;
> tMeasU20 at 8 range 0..63;
> tOffsetU at 16 range 0..63;
> Channel1 at 24 range 0..367;
> Channel2 at 70 range 0..367; -- line 103
...
The compiler complains that Channel2 (and some later components)
must be 8-byte aligned:
>ERROR MESSAGES:
>********************************* gps_io_.a ***********************
> 103: Channel2 at 70 range 0..367;
>A ---------^
>A:error: Appendix F: component must be aligned on a 8 byte boundary
I would guess, without being able to test my guess, that the problem
is the alignment specified for the smaller record type:
> for ICD_IRG_010_Channel_Type use record at mod 8;
This is in contradiction with the byte position (70) specified for
Channel2 within the (8-byte aligned) larger record. Apparently the
compiler on the former system lets a record rep spec override an
alignment specified for the component types, but the present compiler
does not let you do that.
Try removing the "at mod 8" for ICD_IRG_010_Channel_Type. It is not
needed for the code shown in the message, but may, of course, be needed
elsewhere in the program. If so, I guess you could derive a "new" type
from it, and put a "mod 8" on that.
>================================================================
>Capt Britt Snodgrass e-mail: britt@molokai.46tg.af.mil
> member: Team Ada & Team OS/2
>================================================================
Hope this helps,
- Niklas Holsti
--
Niklas Holsti
Until 31 Oct 1994 at Department of Computer Science, phone +358 0 708 4423
P.O. Box 26 (Teollisuuskatu 23), FIN-00014 University of Helsinki, Finland
From 1 Nov 1994 at Space Systems Finland Ltd, phone +358 0 4354 3928
next prev parent reply other threads:[~1994-11-21 5:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-11-18 21:04 Ada Portability... NOT! Capt. Britt Snodgrass
1994-11-19 16:55 ` Robert Dewar
1994-11-21 2:11 ` Carlos Perez
1994-11-21 13:17 ` Robert Dewar
1994-11-21 23:56 ` Keith Thompson
1994-11-22 3:53 ` Robert Dewar
1994-11-23 12:49 ` Michael J. Meier
1994-11-24 19:21 ` R_Tim_Coslet
1994-11-20 1:33 ` Carlos Perez
1994-11-21 5:06 ` Niklas Holsti [this message]
1994-11-21 16:19 ` Norman H. Cohen
1994-11-21 14:59 ` Mitch Gart
1994-11-21 15:40 ` Michael J. Meier
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox