public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2103] [Ada] Simplify iteration over pending instantiations
@ 2021-07-07 16:24 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-07 16:24 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:6feab95cbcf0283b6bf4bf2e6e2e38370618930a
commit r12-2103-g6feab95cbcf0283b6bf4bf2e6e2e38370618930a
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Mon May 17 23:06:56 2021 +0200
[Ada] Simplify iteration over pending instantiations
gcc/ada/
* inline.adb (Instantiate_Bodies): Fix white in declaration.
(Remove_Dead_Instance): Change iteration from WHILE to FOR.
Diff:
---
gcc/ada/inline.adb | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index 589c0f3f16e..6c330b2522b 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -4806,7 +4806,7 @@ package body Inline is
end if;
end Instantiate_Body;
- J, K : Nat;
+ J, K : Nat;
Info : Pending_Body_Info;
-- Start of processing for Instantiate_Bodies
@@ -5153,17 +5153,12 @@ package body Inline is
--------------------------
procedure Remove_Dead_Instance (N : Node_Id) is
- J : Int;
-
begin
- J := 0;
- while J <= Pending_Instantiations.Last loop
+ for J in 0 .. Pending_Instantiations.Last loop
if Pending_Instantiations.Table (J).Inst_Node = N then
Pending_Instantiations.Table (J).Inst_Node := Empty;
return;
end if;
-
- J := J + 1;
end loop;
end Remove_Dead_Instance;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-07 16:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 16:24 [gcc r12-2103] [Ada] Simplify iteration over pending instantiations 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).