From 868268a8ecd1961870513ad2c49df7e1fecd92b8 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Fri, 9 Oct 2020 14:03:38 +0200 Subject: [PATCH] [Ada] Reuse Is_Named_Number where possible gcc/ada/ * sem_attr.adb, sem_prag.adb: Use Is_Named_Number. --- gcc/ada/sem_attr.adb | 2 +- gcc/ada/sem_prag.adb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.30.2