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 autolearn=unavailable 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!mx05.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe23.iad.POSTED!not-for-mail From: Brad Moore User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: ANN: Paraffin 4.2, Parallelism Generics References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 68.145.219.148 X-Complaints-To: internet.abuse@sjrb.ca X-Trace: 1370529508 68.145.219.148 (Thu, 06 Jun 2013 14:38:28 UTC) NNTP-Posting-Date: Thu, 06 Jun 2013 14:38:28 UTC Date: Thu, 06 Jun 2013 08:38:28 -0600 X-Received-Bytes: 3272 Xref: news.eternal-september.org comp.lang.ada:15706 Date: 2013-06-06T08:38:28-06:00 List-Id: On 05/06/2013 9:39 AM, volkert.barr@googlemail.com wrote: > Dear Brad, > > i tried to compile the Praffin 4.2 test-projects and got this compile error: > > parallel.ads:50:06: must use private with clause for preelaborated unit "Multiprocessors" > > Compiler: GNAT GPL 2013 / x86_64-darwin > > Any hints? > > BW, > Volkert > Yes, I suspect you have just downloaded the new GNAT 2013, as I have. I am seeing the same issue. The 2012 GNAT did not complain and compiled the code, but the code actually should not have compiled. The 2013 GNAT is detecting the problem. The problem is because the package spec, parallel.ads has the Remote_Types pragma, but it also with's the package System.Multiprocessors, which is not a Remote_Types, Shared_Passive, or Pure package. A Remote_Types package spec can only depend on one of the above types of package specs. To fix the problem, delete (or comment out) the Remote Types pragma in parallel.ads. Your code should then compile. I was a bit mystified when I first saw the error message. I then remembered an AI http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0206-1.txt?rev=1.6 Which was one I was particularly involved with, where the rules were relaxed so that a Remote_Types package spec could depend on a preelaborated packages so long as the with clause that mentions the preelaborated package is a private with clause. The error message is suggesting that the with for System.Multiprocessors should be changed to be a private with, but that wouldn't work, because the public part of parallel.ads uses declarations from System.Multiprocessors. Hopefully Adacore will improve the error message for GNAT 2014, but it is reporting an actual error in the code. It is not a compiler bug. Ideally the error message would mention that the Remote_Types pragma is triggering the error. I also found another set of problems in the code. The 2013 compiler is now checking that the aliased keyword must be present on parameters of overriding subprograms if it was specified on a parameter of the interface. It wasn't doing that in 2012. I have checked in the changes onto sourceforge, which you can retrieve using git, but I have not yet created a new bugfix release, which I will do as soon as I get a chance. Thanks for reporting the error. Brad