public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2112] [Ada] Reduce scope of local variables
@ 2021-07-07 16:25 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-07 16:25 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:f78c17d267271cf339e4a0efc3bfe7eb0c00b502
commit r12-2112-gf78c17d267271cf339e4a0efc3bfe7eb0c00b502
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Wed May 19 12:07:42 2021 +0200
[Ada] Reduce scope of local variables
gcc/ada/
* sem_ch6.adb (Check_For_Primitive_Subprogram): Move
declarations of local variables after nested subprogram bodies.
Diff:
---
gcc/ada/sem_ch6.adb | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index b0db7fe0939..75e5a99c132 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -11018,10 +11018,6 @@ package body Sem_Ch6 is
(Is_Primitive : out Boolean;
Is_Overriding : Boolean := False)
is
- Formal : Entity_Id;
- F_Typ : Entity_Id;
- B_Typ : Entity_Id;
-
procedure Add_Or_Replace_Untagged_Primitive (Typ : Entity_Id);
-- Either add the new subprogram to the list of primitives for
-- untagged type Typ, or if it overrides a primitive of Typ, then
@@ -11270,6 +11266,12 @@ package body Sem_Ch6 is
end if;
end Visible_Part_Type;
+ -- Local variables
+
+ Formal : Entity_Id;
+ F_Typ : Entity_Id;
+ B_Typ : Entity_Id;
+
-- Start of processing for Check_For_Primitive_Subprogram
begin
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-07 16:25 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:25 [gcc r12-2112] [Ada] Reduce scope of local variables 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).