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,28a755ada641b984 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Tue, 24 Aug 2004 15:56:56 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <%7XQc.100722$eM2.38916@attbi_s51> Subject: Re: Longstanding GNAT bug, bad code, or both -- Answer..Bad code. Date: Tue, 24 Aug 2004 15:57:48 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-o79HDFpPOLfgsk5cenxEC/1Ey2NxXQcwaF1X94Mz/j9HZ5iaWuE0YpqvnF/7SAKyfUP5VlcLFDsk5gr!Ck6Wk6u7/gkxL20Xce5VP3tMTKO/g7scsJgmIIvRIeP0S62lyKk1OR7Bh9MhyLQqCrg+iGbe9fEK X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.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.3.13 Xref: g2news1.google.com comp.lang.ada:2973 Date: 2004-08-24T15:57:48-05:00 List-Id: This is old, but some enlightenment is provided... "Stephen Leake" wrote in message news:mailman.6.1091897074.414.comp.lang.ada@ada-france.org... > "Jeff C," writes: > > Ok. I submitted a bugzilla report and it has already been > > cancelled. Apparently, declaring a variable as aliased makes it > > contrained. (According to one of the gcc Ada maintainers) One would think that the attempt to modify the object inside the procedure would cause Constraint_Error to be raised. Or was this non-Ada code? > > After thinking about it, it is probably why the rule was created > > since I suppose otherwise the alias detection/contraint checking > > would get pretty hard and potentially computationally expensive at > > run time... > > Sounds reasonable to me. The Annotated reference manual sheds no light > on this. If you really want to understand this, read AI-363 (http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00363.TXT). The reason for the rules have to do with access subtypes. Tucker says it best: "Once I sat down and began to piece together the set of patches we made to try to fix the problems with 3.6(11), I was somewhat appalled." (And I would have left out the "somewhat"! :-) Anyway, Ada0Y is going to have a bit of incompatibility in this area, making various access subtypes illegal, and then will drop 3.6(11). That means "aliased" will no longer have the bizarre side-effect of making things constrained. (Janus/Ada never got this right anyway, so I'm happy. :-) So this issue is fixed (it is unfortunate that we didn't get this right in Ada 95). Randy.