[Ada] Fix iteration on formal vectors
authorClaire Dross <dross@adacore.com>
Mon, 9 May 2022 13:44:22 +0000 (15:44 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 2 Jun 2022 09:06:37 +0000 (09:06 +0000)
commit878043af338c3b49f7848f3b73938cfa75a97393
tree5c743dc977487d9ae22a27ced24d6eff8fbebc58
parentf03f48a3843046a4ee888db3b86c0efe3812e2c7
[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.
gcc/ada/libgnat/a-cfinve.adb
gcc/ada/libgnat/a-cfinve.ads
gcc/ada/libgnat/a-cofove.adb
gcc/ada/libgnat/a-cofove.ads