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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a3f3d68c001bb08b,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!infeed-1.proxad.net!news15-e.free.fr!not-for-mail Date: Fri, 11 Nov 2005 12:24:30 +0100 From: Damien Carbonne User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: fr, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: "Limited with" usage Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <43747f6f$0$18304$636a15ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 11 Nov 2005 12:24:31 MET NNTP-Posting-Host: 82.235.135.166 X-Trace: 1131708271 news15-e.free.fr 18304 82.235.135.166:34122 X-Complaints-To: abuse@proxad.net Xref: g2news1.google.com comp.lang.ada:6342 Date: 2005-11-11T12:24:31+01:00 List-Id: Hi, I am doing tests related to "limited with" using GNAT GPL2005 and GPS on a Linux box. This very simple test fails: ---------------------------------------- limited with B; package A is end A; with A; package B is end B; ---------------------------------------- with this message: gnatmake -u -c -u -P/home/damien/dev/tests05/tests05.gpr a.ads -d gcc -c -gnat05 -I- -gnatA /home/damien/dev/tests05/src/a.ads a.ads:1:14: circular unit dependency a.ads:1:14: "A (spec)" depends on "B (spec)" a.ads:1:14: "B (spec)" depends on "A (spec)" a.ads:1:14: "A (spec)" depends on "A (spec)" gnatmake: "/home/damien/dev/tests05/src/a.ads" compilation error If I replace "with A;" by "limited with A;" in package B, then it compiles fine. Reading this paper (http://www.adacore.com/multimedia/pdfs/Ada05_rational_03.pdf, page 5): ------------------------------------------------------------------------- It is important to understand that a limited with clause does not impose a dependence. Thus if a package A has a limited with clause for B, then A does not depend on B as it would with a normal with clause, and so B does not have to be compiled before A or placed into the library before A. If we have a cycle of packages we only have to put limited with on one package since that is sufficient to break the cycle of dependences. However, for symmetry, in this example we have made them both have a limited view of each other. ------------------------------------------------------------------------- I would think that there is a GNAT bug. Am I right or did I miss something ? Thanks for any answer. Damien