comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: aliased & packed?
Date: 1997/05/12
Date: 1997-05-12T00:00:00+00:00	[thread overview]
Message-ID: <dewar.863449539@merv> (raw)
In-Reply-To: 3376B2F0.7CE4@bix.com


Tom Moran says

<<type char_array is array(size_t range <>) of aliased char;
pragma Pack(char array);
  to work?>>

Of course it will work. But what do you mean by working? There is no 
requirement in this case that the pragma Pack have any effect. Indeed
on most byte addressable machines, the pragma Pack will have no effect
anyway.

with GNAT, pragma Pack never has any effect if the components are aliased,
and indeed you will get a warning that the pragma Pack is ignored.

However, it is not silly to put it in necessarily, since you can imagine
a machine that allows independent addressability of characters, but 
still has a cost associated with 8-bit packing of characters. The old
alpha comes close to being like that, but actually on the Alpha, we decide
to pack this by default anyway.






  reply	other threads:[~1997-05-12  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-11  0:00 aliased & packed? tmoran
1997-05-11  0:00 ` Robert Dewar
1997-05-11  0:00   ` Tom Moran
1997-05-12  0:00     ` Robert Dewar [this message]
1997-05-12  0:00       ` Robert A Duff
     [not found]         ` <1997May13.065907.1@eisner>
1997-05-13  0:00           ` Robert A Duff
1997-05-13  0:00             ` Larry Kilgallen
1997-05-14  0:00             ` Richard Kenner
1997-05-13  0:00           ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1997-05-09  0:00 Tom Moran
1997-05-09  0:00 ` Stephen Leake
1997-05-09  0:00   ` Tom Moran
1997-05-10  0:00 ` Robert Dewar
replies disabled

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