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: Tue, 15 Jul 2014 05:56:06 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: Reply-To: anon@att.net NNTP-Posting-Host: Wulv8f5ao1DPxmSqVAHjoA.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:20941 Date: 2014-07-15T05:56:06+00:00 List-Id: -- -- Just because one may think its wrong, does not make it so. -- The RM does not limit scope of the "with_clause". And does not -- fully check the simple_name for duplicates. -- -- This makes it a RM problem not a compiler bug. The "With_Clause" -- scope is defined in RM 10.1.2 (5), and does suggest that the -- "With_Clause" for a multiple compilation files are global. -- -- This example works under GNAT. -- with Ada.Text_IO ; -- Some will say that the compiler should give a warning for -- duplicate entry but the RM permit the following statements with Ada.Text_IO ; with Ada.Text_IO ; procedure t is use Ada ; use Ada.Text_IO ; use Text_IO ; -- Should give a warning for duplicate but the RM permit this use Text_IO ; begin Ada.Text_IO.New_Page ; Text_IO.Put ( "T" ) ; New_Line ; end ; In , AdaMagica writes: >On Thursday, July 10, 2014 3:27:08 AM UTC+2, an...@att.net wrote: >> Actually, the comments for compilation_unit 4 are correct under multiple >> compilation_unit type files, which GNAT does not support. It was tested >> under AdaEd-1.11.0a compiled for SuSE Linux, before I posted a condensed >> version. > >That sounds quite unbelievable to me; looks like AdaEd has a severe bug - if your claim is correct. > >> Note: GNAT (Adacore or GNU) does not support multiple >> compilation_unit (s) within one file. >> >> For multiple compilation_unit, likes those files found in ACVC, the >> external visibility starts with the "with_clause" and that clause >> grants all succeeding compilation_unit(s) access to that package or >> routine no matter how many compilation_unit there are. In other words >> you only need one "with_clause" for Ada compilers that support multiple >> compilation_unit in the same file. > >Please show us such a file or at least give the reference in ACATS 3.1.