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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:8a18:: with SMTP id j24-v6mr9886387jak.37.1535898600802; Sun, 02 Sep 2018 07:30:00 -0700 (PDT) X-Received: by 2002:aca:af15:: with SMTP id y21-v6mr235592oie.6.1535898600702; Sun, 02 Sep 2018 07:30:00 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder3.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!g24-v6no3156412iti.0!news-out.google.com!z5-v6ni2443ite.0!nntp.google.com!g24-v6no3156410iti.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 2 Sep 2018 07:30:00 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:c7:83e3:1ab2:19c8:df89:107c:9e9b; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 2003:c7:83e3:1ab2:19c8:df89:107c:9e9b References: <309225242.556906218.575482.laguest-archeia.com@nntp.aioe.org> <2145221813.556924687.162377.laguest-archeia.com@nntp.aioe.org> <0001HW.213464550E84375C70000C7DB2CF@news.individual.net> <849e14d4-5790-4951-be18-bc2fa8561051@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9cfac5e5-5475-4219-96f1-970a47e91c28@googlegroups.com> Subject: Re: Studying and Maintaining GNAT, Is There Any Interest in a New Group? From: AdaMagica Injection-Date: Sun, 02 Sep 2018 14:30:00 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:54313 Date: 2018-09-02T07:30:00-07:00 List-Id: Am Sonntag, 2. September 2018 14:10:36 UTC+2 schrieb Jeffrey R. Carter: > On 09/02/2018 12:11 PM, AdaMagica wrote: > > Am Samstag, 1. September 2018 00:51:42 UTC+2 schrieb Randy Brukardt: > >> Similarly, in Ada 2012: > >> Ren1 : Natural renames Func(1); -- Legal. > >> Ren2 : Natural renames Natural'(Func(1)); -- Legal. > >> Ren3 : Natural renames Natural(Func(1)); -- Illegal!!! > >> > >> At least Ada 2020 will fix this one. But try this: > >> Ren4 : Boolean renames Boolean'(A and B); -- Legal. > >> Ren5 : Boolean renames Boolean'(A and then B); -- Illegal. > >> Ren6 : Boolean renames "and"(A, B); -- Legal. > >> Ren7 : Boolean renames A and B; -- Illegal. > > > > Ahem, perhaps my Gnat 2018 is not correct, but it rejects only Ren7, which is an expression, and that cannot be renamed according to syntax. > > FSF GNAT 8.0.1 rejects all 3: > > $ gnatmake renaming.ads > gcc-8 -c renaming.ads > renaming.ads:9:27: renaming of conversion only allowed for tagged types > renaming.ads:11:34: expect object name in renaming I guess this is Ren5. Why should Ren4 be legal? Also "A and B" is an expression, not an object. "and"(A,B) is a function call, thus an object, whereas infix "and" in Ren4 is not a function call, but an expression. Ah, I found AARM 6.4(3.a/3). This makes Ren4 legal. So of course "and then" not being an operator, the expression in Ren5 is not considered a function call. Truly bizarre rules.