]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Cleanup unnecessary shadowing in expansion of attribute Old
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 8 Aug 2022 14:18:38 +0000 (16:18 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 6 Sep 2022 07:14:21 +0000 (09:14 +0200)
Code cleanup; semantics is unaffected.

gcc/ada/

* exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):
Remove unnecessary local constant that was shadowing another
constant with the same initial value.

gcc/ada/exp_attr.adb

index c4187c9f5d6318839647f6b1397890d46b09cc6a..21c482822a18fd6cddcd1d9bff0749e6b11c8623 100644 (file)
@@ -4884,7 +4884,6 @@ package body Exp_Attr is
       ---------
 
       when Attribute_Old => Old : declare
-         Typ     : constant Entity_Id := Etype (N);
          CW_Temp : Entity_Id;
          CW_Typ  : Entity_Id;
          Decl    : Node_Id;