diff options
author | Justin Squirek <squirek@adacore.com> | 2021-01-20 12:09:19 -0500 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-07 05:28:56 -0400 |
commit | 7a6303e53b4d2328eb43c933f2cbd7f53526962c (patch) | |
tree | a5b357b10e5436fc0284fbbdde7900183383af05 /gcc/ada/gcc-interface/decl.c | |
parent | fb246154cdeb518b8e8a584032afbda4d381a03b (diff) | |
download | gcc-7a6303e53b4d2328eb43c933f2cbd7f53526962c.zip gcc-7a6303e53b4d2328eb43c933f2cbd7f53526962c.tar.gz gcc-7a6303e53b4d2328eb43c933f2cbd7f53526962c.tar.bz2 |
[Ada] Implement aspect No_Controlled_Parts
gcc/ada/
* aspects.ads: Add entries to register
Aspect_No_Controlled_Parts.
* freeze.adb (Check_No_Controlled_Parts_Violations): Added to
check requirements of aspect No_Controlled_Parts after a type
has been frozen.
(Freeze_Entity): Add call to
Check_No_Controlled_Parts_Violations.
(Find_Aspect_No_Controlled_Parts): Created to obtain the aspect
specification for No_Controlled_Parts on a given type when
present.
(Find_Aspect_No_Controlled_Parts_Value): Protect against invalid
value.
(Has_Aspect_No_Controlled_Parts): Created as a prediate function
to check if No_Controlled_Parts has been specified on a type for
Get_Anacestor_Types_With_Specification.
(Get_Aspect_No_Controlled_Parts_Value): Created to obtain the
value of the aspect No_Controlled_Parts when specified on a
given type.
(Get_Generic_Formal_Types_In_Hierarchy): Created to collect
formal types in a given type's hierarchy.
(Get_Types_With_Aspect_In_Hierarchy): Created to collect types
in a given type's hierarchy with No_Controlled_Parts specified.
* sem_ch13.adb (Analyze_One_Aspect): Add processing for
No_Controlled_Parts, and fix error in check for allowed pragmas
for formal types.
(Check_Expr_Is_OK_Static_Expression): Created to enforce
checking of static expressions in the same vein as
Analyze_Pragma.Check_Expr_OK_Static_Expression.
* sem_util.adb (Collect_Types_In_Hierarchy): Created to collect
types in a given type's hierarchy that match a given predicate
function.
* sem_util.ads: Fix typo.
* snames.ads-tmpl: Add entry for No_Controlled_Parts.
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
0 files changed, 0 insertions, 0 deletions