comp.lang.ada
 help / color / mirror / Atom feed
From: britt@madrid.46tg.af.mil (Britt Snodgrass)
Subject: VADS 8-byte component alignment constraint
Date: 13 Sep 1994 17:06:08 -0500
Date: 1994-09-13T17:06:08-05:00	[thread overview]
Message-ID: <199409132206.RAA16031@news.cs.utexas.edu> (raw)

I'm attempting to port some avionics data processing code from an HP
9000/380 (68040 CPU) to an HP 9000/735 (PA-RISC CPU) (both running
HP-UX Unix) and to an i486 PC (running Windows NT "3.1").  The Ada
compiler is VADS 6.0 on the 9000/380 and VADS 6.2 on the other two.

Code that compiles and runs on the 9000/380 results in "component
must be aligned on a 8 byte boundary" error messages when compiling
certain record structures on the other two machines.  I initially
thought this was something due to the RISC processor but VADS for the
Intel processor has the same constraint.

In general I can't get around this by padding the record structures
because the record has to exactly match the data records on disk. I am
forced to read the data into a Boolean array of the proper length and
then map the Boolean bits to the original record using address
representation clauses.  This is a really ugly way to code but I
haven't found a better solution.

Has anyone else encountered this problem and is there a semi-elegant
workaround?


=======================================================================
Capt Britt Snodgrass e-mail: britt@madrid.46tg.af.mil
=======================================================================



                 reply	other threads:[~1994-09-13 22:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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