From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a37:64c9:: with SMTP id y192mr20834621qkb.190.1625699742514; Wed, 07 Jul 2021 16:15:42 -0700 (PDT) X-Received: by 2002:a25:dc50:: with SMTP id y77mr35682029ybe.405.1625699742319; Wed, 07 Jul 2021 16:15:42 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 7 Jul 2021 16:15:42 -0700 (PDT) In-Reply-To: <2e09faca-1f9a-43d3-99cb-6ae0e27a741cn@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=2601:193:4101:a3a0:d572:63c2:a006:dae8; posting-account=1tLBmgoAAAAfy5sC3GUezzrpVNronPA- NNTP-Posting-Host: 2601:193:4101:a3a0:d572:63c2:a006:dae8 References: <5db8eeb4-f3fc-49a7-b588-6a4b25bdbafcn@googlegroups.com> <2e09faca-1f9a-43d3-99cb-6ae0e27a741cn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4333d2e6-a4f6-46a8-a5df-78bb4e0d915en@googlegroups.com> Subject: Re: deferred constants From: Matt Borchers Injection-Date: Wed, 07 Jul 2021 23:15:42 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62346 List-Id: Of course comments help, but the compiler does not enforce what is written = in comments. (That I'm aware of.) The fact that the example uses RegExp doesn't matter, it was just code I ra= n across and the example could be anything. BTW, what's wrong with Gnat.Re= gExp? It has worked in our code for years. I was looking at old code and began wondering if there was a new or better = way to add protection to this entity. It appears not when it is defined in= the elaboration block. I suppose I could just move the call to 'compile' out of the begin block of= the package as people have suggested. At what point do constants defined = by a function call get elaborated? Before or after the elaboration block? = Might I then potentially encounter a elaboration race condition? The RENAME is interesting as I have not seen that before. Is it a rename o= f the function call (invokes the function upon reference) or a rename of th= e function result? Matt