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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: To collection (GNAT bug) References: <1fo8mdcya4lc1.1xzuim6fz5a6a.dlg@40tude.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1159730606 12.201.97.213 (Sun, 01 Oct 2006 19:23:26 GMT) NNTP-Posting-Date: Sun, 01 Oct 2006 19:23:26 GMT Date: Sun, 01 Oct 2006 19:23:26 GMT Xref: g2news2.google.com comp.lang.ada:6824 Date: 2006-10-01T19:23:26+00:00 List-Id: 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. > Address_To_Access_Conversions serves a different purpose. It declares a new > access type, moreover it is a general access type. That it defines its own access type is a design error, I agree, but not a serious one. Rather than define your own access type, you use the one defined by the instance of the package. -- Jeff Carter "Monsieur Arthur King, who has the brain of a duck, you know." Monty Python & the Holy Grail 09