comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: Question about package Interfaces.
Date: Tue, 14 Sep 2010 19:01:33 +0200
Date: 2010-09-14T19:01:33+02:00	[thread overview]
Message-ID: <i6o9pe$9ug$1@news.eternal-september.org> (raw)
In-Reply-To: <i6o8at$1e1c$1@adenine.netfront.net>

Le 14/09/2010 18:36, Jeffrey Carter a �crit :
> On 09/13/2010 11:33 PM, J-P. Rosen wrote:
>>
>> Imagine that you declared:
>> X : Unsigned_8;
>> and you discover that the declaration advances the data counter by 4
>> bytes. You can interpret that as X occupying 32 bits, or as X occupying
>> only 8 bits with 3 unused padding bytes ahead of it.
>>
>> There is positively no way to tell the difference.
> 
> You could examine the machine code to see if it does 4-byte or 1-byte
> load and stores.
> 
Not exactly.
A compiler is allowed to overwrite unused bytes if it makes code more
efficient


-- 
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr



      reply	other threads:[~2010-09-14 17:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13  1:10 Question about package Interfaces Peter C. Chapin
2010-09-13  3:54 ` Robert A Duff
2010-09-13 13:47   ` Peter C. Chapin
2010-09-13 14:15     ` Robert A Duff
2010-09-13 18:31       ` Peter C. Chapin
2010-09-13 22:47         ` Robert A Duff
2010-09-14  6:33     ` J-P. Rosen
2010-09-14 16:36       ` Jeffrey Carter
2010-09-14 17:01         ` J-P. Rosen [this message]
replies disabled

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