public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-930] [Ada] Fix iteration on formal vectors
@ 2022-06-02  9:08 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-06-02  9:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:878043af338c3b49f7848f3b73938cfa75a97393

commit r13-930-g878043af338c3b49f7848f3b73938cfa75a97393
Author: Claire Dross <dross@adacore.com>
Date:   Mon May 9 15:44:22 2022 +0200

    [Ada] Fix iteration on formal vectors
    
    We need to use Extended_Index for the Position parameter of the Element
    function in formal vectors so it is compatible with other primitives of
    the Iterable aspect.
    
    gcc/ada/
    
            * libgnat/a-cfinve.ads (Element): Change the type of the
            Position parameter to Extended_Index.
            * libgnat/a-cfinve.adb (Element): Idem.
            * libgnat/a-cofove.ads (Element): Idem.
            * libgnat/a-cofove.adb (Element): Idem.

Diff:
---
 gcc/ada/libgnat/a-cfinve.adb | 2 +-
 gcc/ada/libgnat/a-cfinve.ads | 2 +-
 gcc/ada/libgnat/a-cofove.adb | 2 +-
 gcc/ada/libgnat/a-cofove.ads | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/ada/libgnat/a-cfinve.adb b/gcc/ada/libgnat/a-cfinve.adb
index 17b57cb6bc0..a55786d95d0 100644
--- a/gcc/ada/libgnat/a-cfinve.adb
+++ b/gcc/ada/libgnat/a-cfinve.adb
@@ -432,7 +432,7 @@ is
 
    function Element
      (Container : Vector;
-      Index     : Index_Type) return Element_Type
+      Index     : Extended_Index) return Element_Type
    is
    begin
       if Index > Container.Last then
diff --git a/gcc/ada/libgnat/a-cfinve.ads b/gcc/ada/libgnat/a-cfinve.ads
index ec6af9918e8..b5fa29bf7b1 100644
--- a/gcc/ada/libgnat/a-cfinve.ads
+++ b/gcc/ada/libgnat/a-cfinve.ads
@@ -284,7 +284,7 @@ is
 
    function Element
      (Container : Vector;
-      Index     : Index_Type) return Element_Type
+      Index     : Extended_Index) return Element_Type
    with
      Global => null,
      Pre    => Index in First_Index (Container) .. Last_Index (Container),
diff --git a/gcc/ada/libgnat/a-cofove.adb b/gcc/ada/libgnat/a-cofove.adb
index 5f10f57e870..c921184eb03 100644
--- a/gcc/ada/libgnat/a-cofove.adb
+++ b/gcc/ada/libgnat/a-cofove.adb
@@ -370,7 +370,7 @@ is
 
    function Element
      (Container : Vector;
-      Index     : Index_Type) return Element_Type
+      Index     : Extended_Index) return Element_Type
    is
    begin
       if Index > Container.Last then
diff --git a/gcc/ada/libgnat/a-cofove.ads b/gcc/ada/libgnat/a-cofove.ads
index edf95323087..cba10a63746 100644
--- a/gcc/ada/libgnat/a-cofove.ads
+++ b/gcc/ada/libgnat/a-cofove.ads
@@ -263,7 +263,7 @@ is
 
    function Element
      (Container : Vector;
-      Index     : Index_Type) return Element_Type
+      Index     : Extended_Index) return Element_Type
    with
      Global => null,
      Pre    => Index in First_Index (Container) .. Last_Index (Container),


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-02  9:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02  9:08 [gcc r13-930] [Ada] Fix iteration on formal vectors Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).