diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-12-13 20:25:15 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-01-07 16:24:07 +0000 |
commit | e8a52167ea10797308ecc0497127ba0ce44b707b (patch) | |
tree | d6c64d26fc69e47ffdf0dbe38b15a88002dc08a5 /gcc/ada/freeze.adb | |
parent | 3174b67eefb20421d43a6c96473fe41ee4cd1bf9 (diff) | |
download | gcc-e8a52167ea10797308ecc0497127ba0ce44b707b.zip gcc-e8a52167ea10797308ecc0497127ba0ce44b707b.tar.gz gcc-e8a52167ea10797308ecc0497127ba0ce44b707b.tar.bz2 |
[Ada] Remove unnecessary guard for inserting non-empty list
gcc/ada/
* exp_ch3.adb (Expand_N_Object_Declaration): Remove unnecessary
guards.
* exp_ch4.adb (Expand_N_If_Expression): Likewise; clarify comment.
* exp_ch5.adb (Expand_N_If_Statement,
Expand_Iterator_Loop_Over_Container): Likewise.
* exp_ch9.adb (Expand_N_Task_Type_Declaration): Remove redundant
guard.
* freeze.adb (Freeze_All_Ent): Reduce scope of a local variable.
Diffstat (limited to 'gcc/ada/freeze.adb')
-rw-r--r-- | gcc/ada/freeze.adb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 32a82fb..2b89108 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -2354,7 +2354,6 @@ package body Freeze is procedure Freeze_All_Ent (From : Entity_Id; After : in out Node_Id) is E : Entity_Id; Flist : List_Id; - Lastn : Node_Id; procedure Process_Flist; -- If freeze nodes are present, insert and analyze, and reset cursor @@ -2365,6 +2364,7 @@ package body Freeze is ------------------- procedure Process_Flist is + Lastn : Node_Id; begin if Is_Non_Empty_List (Flist) then Lastn := Next (After); |