aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_attr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r--gcc/ada/sem_attr.adb19
1 files changed, 7 insertions, 12 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index bf4d684..4f5047f 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -5693,19 +5693,15 @@ package body Sem_Attr is
when Attribute_Partition_ID =>
Check_E0;
- if P_Type /= Any_Type then
- if not Is_Library_Level_Entity (Entity (P)) then
- Error_Attr_P
- ("prefix of % attribute must be library-level entity");
+ if not Is_Library_Level_Entity (Entity (P)) then
+ Error_Attr_P
+ ("prefix of % attribute must be library-level entity");
- -- The defining entity of prefix should not be declared inside a
- -- Pure unit. RM E.1(8). Is_Pure was set during declaration.
+ -- The defining entity of prefix should not be declared inside a
+ -- Pure unit. RM E.1(8). Is_Pure was set during declaration.
- elsif Is_Entity_Name (P)
- and then Is_Pure (Entity (P))
- then
- Error_Attr_P ("prefix of% attribute must not be declared pure");
- end if;
+ elsif Is_Entity_Name (P) and then Is_Pure (Entity (P)) then
+ Error_Attr_P ("prefix of% attribute must not be declared pure");
end if;
Set_Etype (N, Universal_Integer);
@@ -13018,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