comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Weird error with Dynamic_Predicate
Date: Mon, 12 May 2014 17:17:46 -0500
Date: 2014-05-12T17:17:46-05:00	[thread overview]
Message-ID: <lkrhaa$e6n$1@loke.gir.dk> (raw)
In-Reply-To: 3f9e21b4-868d-44de-9673-824eefb9e79e@googlegroups.com

"Adam Beneschan" <adambeneschan@gmail.com> wrote in message 
news:3f9e21b4-868d-44de-9673-824eefb9e79e@googlegroups.com...
> For what it's worth, here's the smallest reduced example I can come up 
> with that gives the same error message:
>
> package Prova is
>   type Identifier_Name is new String with Dynamic_Predicate => true;
>   function Extract_Namespace (Nome : Identifier_Name)
>                               return Identifier_Name;
> end Prova;
>
> package body Prova is
>   function Extract_Namespace (Nome : Identifier_Name)
>                               return Identifier_Name
>   is
>      Idx : Natural := Ada.Strings.Fixed.Index (String (Nome), ".");
>   begin
>      return "ns";
>   end Extract_Namespace;
> end Prova;
>
> This is with GCC 4.5.4 (20120510).

The package body is missing a context clause of Ada.Strings.Fixed. With that 
corrected, it works with the GNAT I'm using for ACATS testing.

Similarly, the OP's code sample compiles without errors with that GNAT.

Ergo, this is a GNAT bug that's been fixed sometime in the past two years. 
The OP needs a compiler upgrade (whether its available at this time is an 
unknown question).

                                 Randy.





  reply	other threads:[~2014-05-12 22:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12 19:47 Weird error with Dynamic_Predicate mockturtle
2014-05-12 20:45 ` Peter Chapin
2014-05-12 20:52   ` mockturtle
2014-05-12 21:01 ` Adam Beneschan
2014-05-12 22:17   ` Randy Brukardt [this message]
2014-05-13  4:40     ` Simon Wright
2014-05-13 20:50       ` Simon Wright
2014-05-13  4:59 ` Shark8
2014-05-13 12:46 ` G.B.
2014-05-13 17:04   ` Martin
2014-05-13 18:55 ` mockturtle
2014-05-13 21:39   ` Georg Bauhaus
2014-05-14  7:30     ` mockturtle
replies disabled

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