comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: GNAT bug in the GNAT GPL 2014 compiler?
Date: Wed, 25 Mar 2015 08:39:04 +0000
Date: 2015-03-25T08:39:04+00:00	[thread overview]
Message-ID: <lypp7xlbdj.fsf@pushface.org> (raw)
In-Reply-To: 1c486967-cf12-4aa0-9bc0-3774f3fc8188@googlegroups.com

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.

  reply	other threads:[~2015-03-25  8:39 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 [this message]
2015-03-25  8:41     ` Georg Bauhaus
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