From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: To collection (GNAT bug)
Date: Mon, 2 Oct 2006 10:23:39 +0200
Date: 2006-10-02T10:23:38+02:00 [thread overview]
Message-ID: <13weuafrdg7cx$.zkechwsuxyfw.dlg@40tude.net> (raw)
In-Reply-To: OAUTg.1003007$084.622552@attbi_s22
On Sun, 01 Oct 2006 19:23:26 GMT, Jeffrey R. Carter wrote:
> Dmitry A. Kazakov wrote:
>>
>> See ARM 13.9 (17), which requires reversibility of Unchecked_Conversion.
>> That is clearly violated in the example given. Though it is legal not to
>> provide address to access type conversion through Unchecked_Conversion, it
>> is still illegal to provide it wrong.
>
> It doesn't require it; it merely advises it, and then only "where this
> clause defines the result". "This clause defines the result" only when
> "The representation of S is a representation of an object of the target
> subtype". That is not necessarily true in your case. So lack of
> reversibility is not an error, even for a compiler that adheres to this
> advice.
OK, it can be classified as implementation-defined, because the compiler
designer can always claim that Address representation is not the pointer's
one. Who could rebut him?
However, I don't think that it was really the intended behavior in this
case. [ If access String is a fat pointer, then Unchecked_Conversion should
not be allowed at all. Otherwise it must honor the String's dope. ]
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2006-10-02 8:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-30 19:46 To collection (GNAT bug) Dmitry A. Kazakov
2006-10-01 1:21 ` Jeffrey R. Carter
2006-10-01 8:00 ` Dmitry A. Kazakov
2006-10-01 19:23 ` Jeffrey R. Carter
2006-10-01 22:33 ` Frank J. Lhota
2006-10-02 3:08 ` Jeffrey R. Carter
2006-10-02 13:02 ` Frank J. Lhota
2006-10-02 19:50 ` Jeffrey R. Carter
2006-10-02 8:23 ` Dmitry A. Kazakov [this message]
2006-10-02 13:06 ` Frank J. Lhota
2006-10-02 13:43 ` Dmitry A. Kazakov
2006-10-04 17:18 ` Adam Beneschan
2006-10-04 18:51 ` Dmitry A. Kazakov
2006-10-02 19:45 ` Jeffrey R. Carter
2006-10-03 8:36 ` Dmitry A. Kazakov
2006-10-03 19:10 ` Jeffrey R. Carter
2006-10-04 8:01 ` Dmitry A. Kazakov
2006-10-04 9:27 ` Georg Bauhaus
2006-10-04 12:10 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox