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!postnews.google.com!i42g2000cwa.googlegroups.com!not-for-mail From: "Adam Beneschan" Newsgroups: comp.lang.ada Subject: Re: To collection (GNAT bug) Date: 4 Oct 2006 10:18:47 -0700 Organization: http://groups.google.com Message-ID: <1159982327.758504.26940@i42g2000cwa.googlegroups.com> References: <1fo8mdcya4lc1.1xzuim6fz5a6a.dlg@40tude.net> <13weuafrdg7cx$.zkechwsuxyfw.dlg@40tude.net> <1c8Ug.2616$O5.1996@llslave.llan.ll.mit.edu> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1159982333 17716 127.0.0.1 (4 Oct 2006 17:18:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 4 Oct 2006 17:18:53 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: i42g2000cwa.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news2.google.com comp.lang.ada:6867 Date: 2006-10-04T10:18:47-07:00 List-Id: Dmitry A. Kazakov wrote: > On Mon, 02 Oct 2006 09:06:42 -0400, Frank J. Lhota wrote: > > > Dmitry A. Kazakov wrote: > >> On Sun, 01 Oct 2006 19:23:26 GMT, Jeffrey R. Carter wrote: > >> 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. ] > > > > I would agree that an unchecked conversion between an address and a fat > > pointer (or any two types of different sizes, for that matter) should at > > least trigger a warning. > > Well, actually, it gives a warning, that sizes are different. Ummm, wait a minute. If the sizes are different, why did you think that the Unchecked_Conversion would be reversible? I tried your example on GNAT (Linux/x86), and it told me that X'Size=64 and Addr'Size=32. When you convert the 64-bit type to the 32-bit type, of course you will lose some information that you won't recover when you get it back. It's mathematically impossible for this to be reversible. -- Adam