]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove redundant guard against attribute with no expressions
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 26 Mar 2025 17:42:10 +0000 (18:42 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 10 Jun 2025 07:32:10 +0000 (09:32 +0200)
We intentionally allow First to work on No_List, so there is no need to guard
against a No_List. Code cleanup; semantics is unaffected.

gcc/ada/ChangeLog:

* sem_attr.adb (Resolve_Attribute): Remove redundant guard.

gcc/ada/sem_attr.adb

index d4034d28da60f621f9ccaa774e85513d00c909df..4f5047f7b9749272b935504ac0f1eb3270c7a351 100644 (file)
@@ -13014,7 +13014,6 @@ package body Sem_Attr is
             --  their Entity attribute to reference their discriminal.
 
             if Expander_Active
-              and then Present (Expressions (N))
               and then Attr_Id /= Attribute_Make
             then
                declare