aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-12-24 00:54:40 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2021-05-03 05:28:24 -0400
commit28dfe0cb0355695193af0a22ef6e499d589d8143 (patch)
tree2cb60c8a8fb769bdfb87e28c8d0486a26483180f /gcc
parentadd27f7aceefe79fea82a0fbd05f521c2e6f43d4 (diff)
downloadgcc-28dfe0cb0355695193af0a22ef6e499d589d8143.zip
gcc-28dfe0cb0355695193af0a22ef6e499d589d8143.tar.gz
gcc-28dfe0cb0355695193af0a22ef6e499d589d8143.tar.bz2
[Ada] Allow attributes Version and Body_Version prefixed by entries
gcc/ada/ * sem_attr.adb (Check_Program_Unit): Replace tests for Task_Kind and Protected_Kind with a collective test for Concurrent_Kind; likewise, replace calls to Is_Task_Type and Is_Protected_Type with a collective call to Is_Concurrent_Type; simplify into a single membership test; add missing Entry_Kind alternative.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_attr.adb16
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 9d96ee1..a9d095d 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -2302,16 +2302,12 @@ package body Sem_Attr is
T : constant Entity_Id := Etype (Entity (P));
begin
- if K in Subprogram_Kind
- or else K in Task_Kind
- or else K in Protected_Kind
- or else K = E_Package
- or else K in Generic_Unit_Kind
- or else (K = E_Variable
- and then
- (Is_Task_Type (T)
- or else
- Is_Protected_Type (T)))
+ if K in Concurrent_Kind
+ | Entry_Kind
+ | Generic_Unit_Kind
+ | Subprogram_Kind
+ | E_Package
+ or else (K = E_Variable and then Is_Concurrent_Type (T))
then
return;
end if;