From: Piotr Trojanek Date: Fri, 9 Oct 2020 12:03:38 +0000 (+0200) Subject: [Ada] Reuse Is_Named_Number where possible X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=868268a8ecd1961870513ad2c49df7e1fecd92b8;p=gcc.git [Ada] Reuse Is_Named_Number where possible gcc/ada/ * sem_attr.adb, sem_prag.adb: Use Is_Named_Number. --- diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 0fdc830aa2e..8d8903a01e4 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -6636,7 +6636,7 @@ package body Sem_Attr is Check_E0; if not Is_Entity_Name (P) - or else Ekind (Entity (P)) not in Named_Kind + or else not Is_Named_Number (Entity (P)) then Error_Attr_P ("prefix for % attribute must be named number"); diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 2ccaaa2e97a..5a2dffff0f4 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -2383,7 +2383,7 @@ package body Sem_Prag is ("global item must denote object, state or current " & "instance of concurrent type", Item); - if Ekind (Item_Id) in Named_Kind then + if Is_Named_Number (Item_Id) then SPARK_Msg_NE ("\named number & is not an object", Item, Item_Id); end if;