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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:a6c4:: with SMTP id p187-v6mr1545422ioe.65.1527700289425; Wed, 30 May 2018 10:11:29 -0700 (PDT) X-Received: by 2002:a9d:70c2:: with SMTP id w2-v6mr148010otj.2.1527700289209; Wed, 30 May 2018 10:11:29 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!news.redatomik.org!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!85.12.16.69.MISMATCH!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!u74-v6no475941itb.0!news-out.google.com!f20-v6ni7176itd.0!nntp.google.com!u74-v6no475936itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 30 May 2018 10:11:28 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.113.16.86; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 76.113.16.86 References: <55ce14eb-6b83-4ea0-a550-f9e1410d0b06@googlegroups.com> <51dfb377-1b3e-45ca-a211-158101efe557@googlegroups.com> <090d6eb2-9f52-4471-a22e-ce1bdf457188@googlegroups.com> <90f0f8da-dadd-4341-bc0f-dbda94b0516c@googlegroups.com> <137bcc76-2489-4557-979b-5efeecbd9289@googlegroups.com> <7d38a160-35b8-4b39-bfe5-30b607645e93@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <155d993e-3891-4193-b3b2-ce57ed33efe6@googlegroups.com> Subject: Re: Strings with discriminated records From: Shark8 Injection-Date: Wed, 30 May 2018 17:11:29 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2990 X-Received-Body-CRC: 609254881 Xref: reader02.eternal-september.org comp.lang.ada:52784 Date: 2018-05-30T10:11:28-07:00 List-Id: On Monday, May 28, 2018 at 6:41:41 PM UTC-6, Dan'l Miller wrote: > On Monday, May 28, 2018 at 1:38:27 PM UTC-5, Shark8 wrote: >> have bug-boxed on several rename features. (Really frustrating, as I tend to favor RENAME over CONSTANT when possible.) > > What are the precise bugs that you have observed with RENAMES? Crash of GNAT at compile-time or wrong behavior at runtime? "Bug-Box" refers to a compile-time crash that prints out an error-message with a surrounding "ASCII-art", really quite annoying when talking about such a basic feature as renaming attributes. I first encountered it in Byron, where I was renaming attributes that I was using. IIRC, something along the lines of: DECLARE First : Positive renames Input_Vector'First; Last : Natural renames Input_Vector'Last; BEGIN For Index in First..Last-1 loop DECLARE Item : Element renames Input_Vector( Index ); Next : Element renames Input_Vector( Index+1 ); BEGIN -- Do stuff on one item possibly depending on lookahead "Next"... END; End loop; END; If you look in the history of Byron there's one commit where a huge chunk of RENAMES are replaced with the equivalent CONSTANT :=, which is this bug.