comp.lang.ada
 help / color / mirror / Atom feed
From: Andreas Schulz <accot.schulz@nord-com.net>
Subject: Representation clauses and alignment in GNAT
Date: 2000/07/21
Date: 2000-07-21T00:00:00+00:00	[thread overview]
Message-ID: <8l9v5b$k77$1@nnrp1.deja.com> (raw)

Trying to write some code to evaluate a binary data file in 'the Ada
way' (i.e. avoiding 'and 2#0001111110000# / 2**4), I ended up with a
hierarchy of variant records with representation clauses down to
bit level, squeezed into 32 bits. The package compiled fine with
Verdix Ada, but with GNAT I get several compilation errors
'fields of "xxx_REC" must start at storage unit boundary' for the
toplevel records. Looking closer, GNAT apparently complains when
xxx_REC is a variant record, but feels OK when xxx_REC is a plain
record.

I tried to get some more insight on this topic from the GNAT
reference manual, but all I found was 13.3(32) :
An implementation need not support specific alignments...
- Followed -

So, what's 'Followed'?
- We don't have to, so we don't ?
- We don't have to, but we do (better) ?

Andreas Schulz

--
Please excuse for using Deja - it's just to keep spam out of my real
mail


Sent via Deja.com http://www.deja.com/
Before you buy.




                 reply	other threads:[~2000-07-21  0:00 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