Hello,

I've got the following error with PragmArc compiled by GNAT GPL 2015:

gcc -c pragmarc-unbounded_integers.adb
pragmarc-unbounded_integers.adb:37:21: ambiguous expression (cannot resolve 
"Element")
pragmarc-unbounded_integers.adb:37:21: possible interpretation at 
a-convec.ads:113, instance at pragmarc-unbounded_integers.ads:64
pragmarc-unbounded_integers.adb:37:21: possible interpretation at line 17
pragmarc-unbounded_integers.adb:245:54: ambiguous operand in conversion
pragmarc-unbounded_integers.adb:245:54: possible interpretation at line 17
pragmarc-unbounded_integers.adb:245:54: possible interpretation at 
a-convec.ads:113, instance at pragmarc-unbounded_integers.ads:64
pragmarc-unbounded_integers.adb:245:101: ambiguous operand in conversion
pragmarc-unbounded_integers.adb:245:101: possible interpretation at line 17
pragmarc-unbounded_integers.adb:245:101: possible interpretation at 
a-convec.ads:113, instance at pragmarc-unbounded_integers.ads:64
pragmarc-unbounded_integers.adb:307:56: ambiguous operand in conversion
pragmarc-unbounded_integers.adb:307:56: possible interpretation at line 17
pragmarc-unbounded_integers.adb:307:56: possible interpretation at 
a-convec.ads:113, instance at pragmarc-unbounded_integers.ads:64
pragmarc-unbounded_integers.adb:359:54: ambiguous expression (cannot resolve 
"Element")
pragmarc-unbounded_integers.adb:359:54: possible interpretation at 
a-convec.ads:113, instance at pragmarc-unbounded_integers.ads:64
pragmarc-unbounded_integers.adb:359:54: possible interpretation at line 17
pragmarc-unbounded_integers.adb:408:73: ambiguous operand in conversion
pragmarc-unbounded_integers.adb:408:73: possible interpretation at line 17
pragmarc-unbounded_integers.adb:408:73: possible interpretation at 
a-convec.ads:113, instance at pragmarc-unbounded_integers.ads:64
pragmarc-unbounded_integers.adb:414:76: ambiguous operand in conversion
pragmarc-unbounded_integers.adb:414:76: possible interpretation at line 17
pragmarc-unbounded_integers.adb:414:76: possible interpretation at 
a-convec.ads:113, instance at pragmarc-unbounded_integers.ads:64
pragmarc-unbounded_integers.adb:548:55: ambiguous expression (cannot resolve 
"Element")
pragmarc-unbounded_integers.adb:548:55: possible interpretation at 
a-convec.ads:113, instance at pragmarc-unbounded_integers.ads:64
pragmarc-unbounded_integers.adb:548:55: possible interpretation at line 17
pragmarc-unbounded_integers.adb:549:64: ambiguous expression (cannot resolve 
"Element")
pragmarc-unbounded_integers.adb:549:64: possible interpretation at 
a-convec.ads:113, instance at pragmarc-unbounded_integers.ads:64
pragmarc-unbounded_integers.adb:549:64: possible interpretation at line 17
pragmarc-unbounded_integers.adb:605:43: ambiguous expression (cannot resolve 
"Element")
pragmarc-unbounded_integers.adb:605:43: possible interpretation at 
a-convec.ads:113, instance at pragmarc-unbounded_integers.ads:64
pragmarc-unbounded_integers.adb:605:43: possible interpretation at line 17
pragmarc-unbounded_integers.adb:606:44: ambiguous expression (cannot resolve 
"Element")
pragmarc-unbounded_integers.adb:606:44: possible interpretation at 
a-convec.ads:113, instance at pragmarc-unbounded_integers.ads:64
pragmarc-unbounded_integers.adb:606:44: possible interpretation at line 17



So I made the not satisfying quick fix below:

--- a/pragmarc-unbounded_integers.adb
+++ b/pragmarc-unbounded_integers.adb
@@ -13,8 +13,9 @@ package body PragmARC.Unbounded_Integers is
    Radix : constant := Digit_Value'Modulus;
 
    use type Digit_List;
+   use Digit_Lists;
 
-   function Element (List : Digit_List; Index : Positive) return Digit_Value;
+   --function Element (List : Digit_List; Index : Positive) return Digit_Value;
    -- If Index is a valid index into List, returns the value stored there; 
otherwise, returns 0
 
    procedure Insert (List : in out Digit_List; Index : in Positive; Value : in 
Digit_Value);
@@ -30,15 +31,15 @@ package body PragmARC.Unbounded_Integers is
                      Remainder :    out Unbounded_Integer);
    -- Left > 0, Right > 0.
 
-   function Element (List : Digit_List; Index : Positive) return Digit_Value is
-      -- Empty declarative part
-   begin -- Element
-      if Index in 1 .. List.Last_Index then
-         return List.Element (Index);
-      end if;
-
-      return 0;
-   end Element;
+--     function Element (List : Digit_List; Index : Positive) return 
Digit_Value is
+--        -- Empty declarative part
+--     begin -- Element
+--        if Index in 1 .. List.Last_Index then
+--           return List.Element (Index);
+--        end if;
+--
+--        return 0;
+--     end Element;
 
    procedure Insert (List : in out Digit_List; Index : in Positive; Value : in 
Digit_Value) is
       -- Empty declarative part


What was wrong?
What could be a better fix?

Regards, Pascal.
http://blady.pagesperso-orange.fr



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to