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 10.236.31.97 with SMTP id l61mr5913924yha.19.1429978177394; Sat, 25 Apr 2015 09:09:37 -0700 (PDT) X-Received: by 10.140.48.11 with SMTP id n11mr40653qga.35.1429978177375; Sat, 25 Apr 2015 09:09:37 -0700 (PDT) Path: border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!z60no3680129qgd.0!news-out.google.com!k20ni1071qgd.0!nntp.google.com!z60no3680127qgd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 25 Apr 2015 09:09:37 -0700 (PDT) In-Reply-To: <854mo4cp1g.fsf@stephe-leake.org> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=91.55.201.38; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 91.55.201.38 References: <85r3rlg6dd.fsf@stephe-leake.org> <85tww5d57k.fsf@stephe-leake.org> <854mo4cp1g.fsf@stephe-leake.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: OpenToken 6.0 released From: AdaMagica Injection-Date: Sat, 25 Apr 2015 16:09:37 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.giganews.com comp.lang.ada:192931 Date: 2015-04-25T09:09:37-07:00 List-Id: Am Samstag, 25. April 2015 15:31:42 UTC+2 schrieb Stephen Leake: > AdaMagica writes: > > May I propose to add pragma Elaborate_Body to all Recognizer > > subpackages? This will prevent any elaboration problems with calling > > the Get procedures - otherwise you have to use Elaborate{_All} in > > every caller of Get. > > > > (I see that there is no such pragma e.g. in the Ada Lexer, but I think > > it is only a coincidence that elaboration does not fail.) > > I've never had an elaboration problem when using the default GNAT > elaboration algorithm. > Are you using another compiler? Gnat in the standard mode implicitly uses an Elaborate_All, you have to use -gnatE (IIRC) to get Ada RM behaviour. Thus other compilers *might* generate elaboration problems. Elaborate_Body (if possible; under certain circumstances, it cannot be used) prevents any problems. The Recognizers, those that I checked, should allow El_Bd. Your test procedures should show where the pragma cannot be used.