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, 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!mx02.eternal-september.org!.POSTED!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: GNAT bug in the GNAT GPL 2014 compiler? Date: Wed, 25 Mar 2015 09:41:01 +0100 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> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 25 Mar 2015 08:40:09 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="8af6dd8672a4e3617303ee016aead91f"; logging-data="29572"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/N+E51esS0ls/GjUGsJFotGkSHkHaEuqo=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 In-Reply-To: <1c486967-cf12-4aa0-9bc0-3774f3fc8188@googlegroups.com> Cancel-Lock: sha1:SfGxmIs/4yr5kWs+TpHnooXsAmQ= Xref: news.eternal-september.org comp.lang.ada:25246 Date: 2015-03-25T09:41:01+01:00 List-Id: On 25.03.15 08:35, gorgelo@hotmail.com wrote: > 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. FWIW, the compiler accepts line 170 if the prefix "Standard" is added to the expression assigned. Not sure what is going on, but I'd suspect same naming overload. diff --git a/source_files/amock-main_application.adb b/source_files/amock-main_application.adb index 8cda6f5..93784b1 100644 --- a/source_files/amock-main_application.adb +++ b/source_files/amock-main_application.adb @@ -167,7 +167,7 @@ package body Amock.Main_Application is Input_Package : Asis.Compilation_Unit; Input_Package_Declaration : Asis.Declaration; - Input_Package_Name_As_Wide_String : Wide_String := Ada.Characters.Conversions.To_Wide_String (Input_Package_Name); + Input_Package_Name_As_Wide_String : Wide_String := Standard.Ada.Characters.Conversions.To_Wide_String (Input_Package_Name); begin Asis.Implementation.Initialize ("-ws"); Asis.Ada_Environments.Associate (My_Context, "My Asis Context", "-C1 .amock/command_line.adt");