comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus@futureapps.invalid>
Subject: Re: GNAT bug in the GNAT GPL 2014 compiler?
Date: Wed, 25 Mar 2015 09:41:01 +0100
Date: 2015-03-25T09:41:01+01:00	[thread overview]
Message-ID: <mets99$ss4$1@dont-email.me> (raw)
In-Reply-To: <1c486967-cf12-4aa0-9bc0-3774f3fc8188@googlegroups.com>

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");



  parent reply	other threads:[~2015-03-25  8:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 19:19 GNAT bug in the GNAT GPL 2014 compiler? gorgelo
2015-03-24 21:56 ` Anh Vo
2015-03-25  7:35   ` gorgelo
2015-03-25  8:39     ` Simon Wright
2015-03-25  8:41     ` Georg Bauhaus [this message]
2015-03-25  9:13       ` Egil H H
2015-03-25 14:16         ` Bob Duff
2015-03-25 19:46           ` gorgelo
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox