From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d0475d4d02ffd8d9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!proxad.net!proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: To collection (GNAT bug) Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1fo8mdcya4lc1.1xzuim6fz5a6a.dlg@40tude.net> Date: Mon, 2 Oct 2006 10:23:39 +0200 Message-ID: <13weuafrdg7cx$.zkechwsuxyfw.dlg@40tude.net> NNTP-Posting-Date: 02 Oct 2006 10:23:38 CEST NNTP-Posting-Host: 8c21f9de.newsspool3.arcor-online.net X-Trace: DXC=eBn7aE?j^HZ\PS5Xo=M[RVMcF=Q^Z^V3X4Fo<]lROoRQ4nDHegD_]RUWU2@8\iLEMPDNcfSJ;bb[UIRnRBaCdH22n?hTm^I7PNAb@jUM[ X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6838 Date: 2006-10-02T10:23:38+02:00 List-Id: 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