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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: anon@att.net Newsgroups: comp.lang.ada Subject: Re: Position of "use" Date: Wed, 16 Jul 2014 07:19:03 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: Reply-To: anon@att.net NNTP-Posting-Host: NXe6MlmivBaffDATuBgwLQ.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: IBM NewsReader/2 2.0 Xref: news.eternal-september.org comp.lang.ada:20969 Date: 2014-07-16T07:19:03+00:00 List-Id: Adam. Note: I was not talking or using option -gnat83, or pragma Ada_83. Only the "with_clause" and "use_clause" using AdaEd and GNAT. I used AdaEd and GNAT and their RM so anyone see what I am saying, because only AdaEd and GNAT compilers are downloadable and free and both have been validated, while the others compilers requires purchasing, and no guarantee they will work with current OS. Also, unsure if the sold IBM Apex compiler is even available to the general public. Now, "-gnat83" basically just set the restrictions mode for 83, like the pragma Ada_83. But, in the GNAT_RM pragma Ada_83. states: "However, there is no guarantee that code that is processed correctly by GNAT in Ada 83 mode will in fact compile and execute with an Ada 83 compiler, since GNAT does not enforce all the additional checks required by Ada 83." Then there the change to "copy by type to the second stack" aka "Return by type" so, a number of Ada 83, 95, and early Ada 2005 programs will no longer compile as initially written. Which suggest that unless you using a pre-"Return by type" compiler that the pragma Ada_83, Ada_95 or Ada_05, or command options -gnat83, -gnat95, -gnat05 will not truly guarantee the code to be processed correctly. This one one reason I wish Adacore would make available for download the compiler source package for each Ada standard. such as GNAT 0.xx: initial version of gnat for Ada 83, Ada 95 code removed GNAT 3.1x: gnat for Ada 95 GNAT 2011: gnat for Ada 2005 Or course it up to the downloader to find a way to compile the code. And add the correct gcc back_end. Also most people use GNAT by either gnat make or when binding to other languages. gnat compile .adb gnat build .ali gnat link .ali while the other 10+ routines like chop are not normally used. Plus, GNAT "Chop" splits the file by looking for the end of the "library_unit" or "secondary_unit". Any statement after the end of the unit begins on the next file, this can include comments after unit. Also, "Chop" does not check for configuration pragmas because GNAT does not support theses pragmas ( System_Name, Memory_Size, Storage_Unit ). In , Adam Beneschan writes: >On Tuesday, July 15, 2014 10:01:12 AM UTC-7, Simon Wright wrote: > >> But, in Ada83, a *pragma*'s scope extended over the whole compilation >> (all the compilation units). > >I don't know that this was universally true; I don't see a general rule to = >that effect. The rules vary from pragma to pragma. STORAGE_UNIT and SYSTE= >M_NAME (since removed) had to appear at the beginning of a compilation and = >applied to every compilation unit in the compilation (this seems to anticip= >ate the "configuration pragma" rules of Ada 95 and beyond). ELABORATE, how= >ever, appears in a context clause (as does the "use" clause) but only appli= >es to one compilation unit. Most of the pragmas were only allowed inside d= >eclarations. LIST(ON) and LIST(OFF) apply to the entire compilation, of co= >urse, but since it controls only the listing output and has no effect on se= >mantics or generated code, it's really a special case. Implementation-defi= >ned pragmas follow whatever rules the vendor decides they should. > >I think the situation is pretty much the same in Ada 95+, except a little m= >ore formalized. There's no one rule defining the scope of pragmas, but the= >re are rules for categories of pragmas (in particular "configuration pragma= >s"). > > -- Adam