comp.lang.ada
 help / color / mirror / Atom feed
From: "Y.Tomino" <demoonlit@panathenaia.halfmoon.jp>
Subject: Re: Pure, Storage_Size and Unchecked_Conversion
Date: Mon, 09 Jul 2007 06:31:19 -0700
Date: 2007-07-09T06:31:19-07:00	[thread overview]
Message-ID: <1183987879.777428.313710@a26g2000pre.googlegroups.com> (raw)
In-Reply-To: <1636644.syfCPdaSFI@linux1.krischik.com>

On Jul 9, 1:08 am, Martin Krischik <krisc...@users.sourceforge.net>
wrote:
> You are aware that this will only work on 32 bit system while 64 bit is the
> future. It does - of course - not mean that you can't do it. You just have
> to do it right.

Don't mind. :-)

> It's one of the definitions of a pure unit: no named access types. It you
> read the Distributed System Annex then you will see why it has to be that
> way.

Thank you. I read it.
I understood access to class wide types is prohibited in remote
packages,
but I could not find description that normal access types were
prohibited (in pure packages).

Actually, Usual functions having access types like F1 are OK.
Generic functions like Ada.Unchecked_Conversion
(or my generic function I tested *1) are disallowed.

What is different ?

*1
generic type T is private; type A is access T;
function G (X : A) return A;
pragma Pure (G); --OK

function G (X : A) return A is begin return X; end G;

with G;
package P is
pragma Pure (P);
type A is access Integer; for A'Storage_Size use 0; --OK
function F1 (X : A) return A; --OK
function F2 is new G (A); --NG
end P;

--
YT http://panathenaia.halfmoon.jp/alang/ada.html




  reply	other threads:[~2007-07-09 13:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-08  0:24 Pure, Storage_Size and Unchecked_Conversion Y.Tomino
2007-07-08  9:49 ` Georg Bauhaus
2007-07-08 10:41   ` Y.Tomino
2007-07-08 16:08 ` Martin Krischik
2007-07-09 13:31   ` Y.Tomino [this message]
2007-07-09 21:31     ` Georg Bauhaus
2007-07-10  1:35 ` Randy Brukardt
2007-07-10  8:30   ` Georg Bauhaus
2007-07-15 17:30   ` Y.Tomino
replies disabled

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