comp.lang.ada
 help / color / mirror / Atom feed
From: Marius Amado Alves <amado.alves@netcabo.pt>
To: tmoran@acm.org
Cc: comp.lang.ada@ada-france.org
Subject: Re: setting 'Size and unchecked conversion safe here?
Date: Sat, 12 Feb 2005 13:10:33 +0000
Date: 2005-02-12T13:10:33+00:00	[thread overview]
Message-ID: <mailman.136.1108213687.527.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <av-dneVTs6gE2ZDfRVn-2A@comcast.com>


On 11 Feb 2005, at 23:49, tmoran@acm.org wrote:

>> What I'm not sure about is whether the unused 32
>> bits are harmless or not (by definition). Thanks.
>   An Unchecked_Conversion of dissimilar sizes is clearly unsafe, simply
> because it's implementation defined how, or if, it works.

Strictly they have the same size, because I said so with Size clauses.

>   But your problem appears to be the warning on
>     for My_Access_To_Subprogram_Type'Size use 64;
> ARM 13.3(42-43) recommends that a compiler should support this.
> Presumably you don't care how the compiler places the 32 useful bits in
> the 64 bit slot, so long as you get out what you put in.

Actually I'd be happier if the unused bits could be forced to have a 
specified value, say all zeros, or all ones. To ensure a one-to-one 
mapping between the original access values and their representation 
with the extra bits. Would pragma Normalize_Scalars do the trick? I'd 
rather avoid it, because it has partition-wide effect, which is 
overkill for the case at hand, and so might even interfere with other 
parts of the program.

>   So another
> compiler might do it differently, but your program would still work
> correctly.

Excelent. That was my expectation. Thanks a lot.




  reply	other threads:[~2005-02-12 13:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-11 18:52 setting 'Size and unchecked conversion safe here? Marius Amado Alves
2005-02-11 19:08 ` Martin Krischik
2005-02-11 20:34 ` tmoran
2005-02-11 22:37   ` Marius Amado Alves
2005-02-11 23:49     ` tmoran
2005-02-12 13:10       ` Marius Amado Alves [this message]
2005-02-12  6:55     ` Martin Krischik
2005-02-12 13:30       ` Marius Amado Alves
2005-02-12 14:57         ` Martin Krischik
2005-02-12 16:03           ` Marius Amado Alves
2005-02-12 16:04           ` Marius Amado Alves
2005-02-11 23:38 ` Robert A Duff
2005-02-12 12:46   ` Marius Amado Alves
2005-02-12 18:05     ` tmoran
2005-02-12 18:29       ` Marius Amado Alves
2005-02-12 19:14     ` Robert A Duff
2005-02-12 19:48       ` Marius Amado Alves
replies disabled

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