comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Aligning record components
Date: 1997/07/08
Date: 1997-07-08T00:00:00+00:00	[thread overview]
Message-ID: <dewar.868372427@merv> (raw)
In-Reply-To: 01bc8b3a$d9161b80$7175b89e@Ken'slaptop.ssd.loral.com


kgamble says

<<I do not know why GNAT does not allow 2-byte alignments. There are still

plenty of 16-bit target machines that Ada supports.

>>

Of course GNAT supports 2-byte alignments on a target where 2-byte alignment is natural. Alignment
requirements are highly target dependent!

GNAT does allow misaligned integers, because this is a widely used feature.

An Ada 95 compiler is not required to allow *any* misalignment, and GNAT does not
bother to allow misaligned floating-point for two reasons

One techncail

a) the cost of unaligned fpt access is MUCH higher than unaligned integer access
on a typical machine

One non-techncial

b) none of our customers have ever indicated a desire for this feature

It would not be that hard to do, but would be non-zero work. You could of course build a new configuration file with diminished alignment requirements.





  reply	other threads:[~1997-07-08  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-08  0:00 Aligning record components kgamble
1997-07-08  0:00 ` Robert Dewar [this message]
1997-07-08  0:00 ` Tucker Taft
replies disabled

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