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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d402e2c741db0d0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-08 22:16:28 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 09 Jan 2004 00:16:26 -0600 Date: Fri, 09 Jan 2004 01:16:26 -0500 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Language lawyer question: Equality on 'Access attributes References: <4LKdnRRNyv6AlmCiRVn-ig@comcast.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.34.214.193 X-Trace: sv3-YDKpgKezK6vMoo95IJm/CmsdWYdhRcflYkhyhwI9sp1makzFs/0uSAnTp0JbJ0+0iIgwx7uwFwgtLjy!KKmhezYHiVJGSHeIu0yf5bv0vacPqjBmVvBYnoTUjie3Blm0DUX28+qt0ZL2Vg== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:4247 Date: 2004-01-09T01:16:26-05:00 List-Id: Robert A Duff wrote: > This is a subtle area, so I could be missing something, but I agree with > your (Adam's) analysis here. I think GNAT has a bug. And I think that GNAT is right, which is why we have the ARG. ;-) But in this case I think this is a low priority AI, and if one is created, I would vote for whatever it says just to close the issue. The technical question is how many "=" operations could apply in this case. My contention was that there are at least two, one associated with the 'Access attributes (actually I think there is one for each attribute) and one declared by the user. It is much easier to see why there is an issue if X is on the stack, and Y is in a user managed heap, or even just one object at library level, and one on the stack. (That way one value has a nested accessability level to be checked, and the other has a static lifetime longer than the program.) You could argue that those pointers can never compare equal--and I'd agree. But the compiler conceptually has two objects of different types. If you want the comparison to occur, you can assign one or both to a local access variable, which will "scrub off" the access level information. Yes, the compiler can be smart about this and conclude that if the two objects have different accessability levels, they can't compare equal. But normally in Ada we prefer to have the compiler tell you there is a potential issue rather than have different compilers do different things. (Which is why if this becomes an AI, I will vote back the consensus, whatever it is. It is more important to have a consistent language than to "win" language lawyer debates in the ARG. ;-) -- Robert I. Eachus "The war on terror is a different kind of war, waged capture by capture, cell by cell, and victory by victory. Our security is assured by our perseverance and by our sure belief in the success of liberty." -- George W. Bush