[gcc r12-3714] [Ada] Remove redundant checks for non-empty list of aspects

Pierre-Marie de Rodat pmderodat@gcc.gnu.org
Mon Sep 20 13:06:00 GMT 2021


https://gcc.gnu.org/g:71a4bdada59d2d6d1f17c949eaf9377ebb7a8854

commit r12-3714-g71a4bdada59d2d6d1f17c949eaf9377ebb7a8854
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Mon Jun 28 22:34:10 2021 +0200

    [Ada] Remove redundant checks for non-empty list of aspects
    
    gcc/ada/
    
            * inline.adb (Has_Excluded_Declaration): Remove redundant guard;
            the guarded code will call First on a No_List, which is
            well-defined and gives Empty.

Diff:
---
 gcc/ada/inline.adb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index 84e2bc866b9..773b376685b 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -4319,9 +4319,7 @@ package body Inline is
          --  functions, i.e. nested subprogram bodies, so inlining is not
          --  possible.
 
-         elsif Nkind (Decl) = N_Subtype_Declaration
-           and then Present (Aspect_Specifications (Decl))
-         then
+         elsif Nkind (Decl) = N_Subtype_Declaration then
             declare
                A    : Node_Id;
                A_Id : Aspect_Id;


More information about the Gcc-cvs mailing list