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!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GNAT bug in the GNAT GPL 2014 compiler? Date: Wed, 25 Mar 2015 08:39:04 +0000 Organization: A noiseless patient Spider Message-ID: References: <89634980-4629-4c50-a4bc-e7cd344ca222@googlegroups.com> <850d68b8-fdc6-4363-a8c2-d5868ecbed6f@googlegroups.com> <1c486967-cf12-4aa0-9bc0-3774f3fc8188@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="639fc80d983459c1c824f7cd3788af8d"; logging-data="29035"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19IT5Pzzp8/oNOe0AucWMoR3KNoB25AVtI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin) Cancel-Lock: sha1:sEEfuTX8x9HAGChITxjd5k1Wck4= sha1:VobyT+pZnapQb81MH4c9v0Xau5w= Xref: news.eternal-september.org comp.lang.ada:25245 Date: 2015-03-25T08:39:04+00:00 List-Id: gorgelo@hotmail.com writes: > Den tisdag 24 mars 2015 kl. 22:56:36 UTC+1 skrev Anh Vo: >> On Tuesday, March 24, 2015 at 12:19:30 PM UTC-7, gor...@hotmail.com wrote: >> > >> > The compilation error is: amock-main_application.adb:170:61: >> > missing "with Ada.Characters;" >> > >> > That file contains "with Ada.Characters.Conversions;" among the >> > with-statements. Why does the compiler complain? If one comments >> > out the line 170, the code compiles just fine. >> > >> Line 170 looks perfectly fine. Could you post the exact compilation >> error message. I am curious about this also. >> >> Anh Vo > > Here is the exact compilation error message: > > joakimstrandberg$ gprbuild -P amock.gpr > gcc -c -gnat12 amock-main_application.adb > amock-main_application.adb:170:61: missing "with Ada.Characters;" > gprbuild: *** compilation phase failed > > It's not only the package Ada.Characters that the compiler complains > about. It does not allow usage of Ada.Text_IO nor Ada.Wide_Text_IO. It > seems that any usage of a subprogram in any of the child packages of > the Ada package is forbidden in the body of the Amock.Main_Application > package. I can't imagine it can be anything but a GNAT compiler bug. I > am hoping to be proven wrong and that I've done some obvious mistake. I get the same behaviour with GCC 4.9.1 (I would have tried GCC 5.0.0 also but I don't have ASIS built for it). Compiling with -gnatwa (all standard warnings) and commenting out the "not referenced" packages and using pragma Unreferenced on the Control parameters of Pre and Post made the error go away. Not much help for your full code, of course. Looks like a compiler bug to me.