diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-05-19 12:07:42 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-07-07 16:23:14 +0000 |
commit | f78c17d267271cf339e4a0efc3bfe7eb0c00b502 (patch) | |
tree | 53e750deebcb9c24924ca9e3154031a4568e4ab6 | |
parent | a7bb69067afdea57aadd10583342c315925d2cbd (diff) | |
download | gcc-f78c17d267271cf339e4a0efc3bfe7eb0c00b502.zip gcc-f78c17d267271cf339e4a0efc3bfe7eb0c00b502.tar.gz gcc-f78c17d267271cf339e4a0efc3bfe7eb0c00b502.tar.bz2 |
[Ada] Reduce scope of local variables
gcc/ada/
* sem_ch6.adb (Check_For_Primitive_Subprogram): Move
declarations of local variables after nested subprogram bodies.
-rw-r--r-- | gcc/ada/sem_ch6.adb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index b0db7fe..75e5a99 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 |