diff options
author | Ronan Desplanques <desplanques@adacore.com> | 2023-03-03 12:33:21 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-25 09:44:16 +0200 |
commit | bc46312fe9088b16a39303db54d49b43165dec4b (patch) | |
tree | e3615a3cebbe1f65b64d58b8cf99659cd08b8286 | |
parent | cf6ddb553085c74d75eabac7be9dbc82dda87f0a (diff) | |
download | gcc-bc46312fe9088b16a39303db54d49b43165dec4b.zip gcc-bc46312fe9088b16a39303db54d49b43165dec4b.tar.gz gcc-bc46312fe9088b16a39303db54d49b43165dec4b.tar.bz2 |
ada: Reduce span of variable
This patch does not change the behavior of the compiler, but is
intended to improve readability. It seizes an opportunity to move
a variable declaration to a smaller scope, so that it's clearer
that the variable is not used outside of that scope.
gcc/ada/
* sem_ch3.adb (Replace_Type): Reduce span of variable.
-rw-r--r-- | gcc/ada/sem_ch3.adb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index a078319..c8af679 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -15901,7 +15901,6 @@ package body Sem_Ch3 is procedure Replace_Type (Id, New_Id : Entity_Id) is Id_Type : constant Entity_Id := Etype (Id); - Acc_Type : Entity_Id; Par : constant Node_Id := Parent (Derived_Type); begin @@ -15913,6 +15912,7 @@ package body Sem_Ch3 is if Ekind (Id_Type) = E_Anonymous_Access_Type then declare + Acc_Type : Entity_Id; Desig_Typ : Entity_Id := Designated_Type (Id_Type); begin |