comp.lang.ada
 help / color / mirror / Atom feed
* Representation clauses and alignment in GNAT
@ 2000-07-21  0:00 Andreas Schulz
  0 siblings, 0 replies; only message in thread
From: Andreas Schulz @ 2000-07-21  0:00 UTC (permalink / 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.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-07-21  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-21  0:00 Representation clauses and alignment in GNAT Andreas Schulz

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