diff options
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r-- | gcc/ada/sem_attr.adb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 789cb47..9b33acd 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -3014,6 +3014,28 @@ package body Sem_Attr is Check_Floating_Point_Type_0; Set_Etype (N, Standard_Boolean); + --------------------- + -- Descriptor_Size -- + --------------------- + + when Attribute_Descriptor_Size => + Check_E0; + + -- Attribute Descriptor_Size is relevant only in the context of an + -- unconstrained array type. + + if Is_Entity_Name (P) + and then Is_Type (Entity (P)) + and then Is_Array_Type (Entity (P)) + and then not Is_Constrained (Entity (P)) + then + null; + else + Error_Attr_P ("invalid prefix for % attribute"); + end if; + + Set_Etype (N, Universal_Integer); + ------------ -- Digits -- ------------ @@ -6246,6 +6268,13 @@ package body Sem_Attr is Fold_Uint (N, UI_From_Int (Boolean'Pos (Denorm_On_Target)), True); + --------------------- + -- Descriptor_Size -- + --------------------- + + when Attribute_Descriptor_Size => + null; + ------------ -- Digits -- ------------ |