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_s21.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> <13weuafrdg7cx$.zkechwsuxyfw.dlg@40tude.net> <87fgklu009fm$.1jy0dch55kk6a.dlg@40tude.net> In-Reply-To: <87fgklu009fm$.1jy0dch55kk6a.dlg@40tude.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <5ByUg.89026$aJ.31485@attbi_s21> NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1159902657 12.201.97.213 (Tue, 03 Oct 2006 19:10:57 GMT) NNTP-Posting-Date: Tue, 03 Oct 2006 19:10:57 GMT Date: Tue, 03 Oct 2006 19:10:57 GMT Xref: g2news2.google.com comp.lang.ada:6851 Date: 2006-10-03T19:10:57+00:00 List-Id: Dmitry A. Kazakov wrote: > > No. These aren't equivalent. In many cases the programmer does not know > what he is doing on the level of bits and bytes. Otherwise he probably > wouldn't instantiate Unchecked_Conversion, but wrote a conversion of his > own. He only knows the semantics of an object and asks the compiler to > convert the types according to this semantics. It is a deal - the > programmer knows the semantics, the compiler does the representation. I think you misunderstand the meaning of unchecked. 'Unchecked_Access tells the compiler that this access value will not violate the accessibility rules, even though the compiler thinks it will. Unchecked_Deallocation tells the compiler that there are no other references to this designated object, even if there are. And Unchecked_Conversion means to interpret the bit pattern starting with the bits of this value as being of that type, whether it makes sense or not. It does not involve a change of representation. In terms of object code, Unchecked_Deallocation does nothing; it merely provides a way around the restrictions of the language. -- Jeff Carter "You empty-headed animal-food-trough wiper." Monty Python & the Holy Grail 04