comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Pure, Storage_Size and Unchecked_Conversion
Date: Mon, 9 Jul 2007 20:35:11 -0500
Date: 2007-07-09T20:35:11-05:00	[thread overview]
Message-ID: <f6unk4$gb8$1@jacob-sparre.dk> (raw)
In-Reply-To: 1183854255.792142.110150@i38g2000prf.googlegroups.com

"Y.Tomino" <demoonlit@panathenaia.halfmoon.jp> wrote in message
news:1183854255.792142.110150@i38g2000prf.googlegroups.com...
...
> Ada.Unchecked_Conversion is pure generic function.
> I think the condition of F1 and F2 is the same.
> but, I saw this message:
>
> pure_ss_unc.ads:7:58: named access types not allowed in pure unit
>
>    function F1 (X : Integer) return T; -- OK
>    function F2 is new Ada.Unchecked_Conversion (Integer, T); -- NG
>
> Why does compiler make an error at F2?

You've gotten a whole bunch of answers, but I think the correct one has not
be provided:
it is a compiler bug and there should not be an error at F2.

I'd suggest that you (and others as well) should ask the people at AdaCore
about what appear to be compiler bugs (especially in things changed by the
Amendment, which are highly likely to be buggy as they are new) rather than
confusing many with examples that seem to show non-existent limitations of
Ada (as opposed to a particular compiler). OTOH, if you don't have an
AdaCore contract, you won't get a timely answer from them, but I'd have to
say that you get what you pay for in that case...

                                        Randy.






  parent reply	other threads:[~2007-07-10  1:35 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
2007-07-09 21:31     ` Georg Bauhaus
2007-07-10  1:35 ` Randy Brukardt [this message]
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