aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.ads
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2020-05-26 15:39:38 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-07-10 05:16:18 -0400
commit745f56989ead5d32b4016e39bf2656f23e2b16e7 (patch)
tree5bd171fd34ae57a8e0bd9d2d71f2111add18f5c6 /gcc/ada/sem_ch13.ads
parent2f9821a09ac0c5f07ce621ef6a32acfdfa2e485e (diff)
downloadgcc-745f56989ead5d32b4016e39bf2656f23e2b16e7.zip
gcc-745f56989ead5d32b4016e39bf2656f23e2b16e7.tar.gz
gcc-745f56989ead5d32b4016e39bf2656f23e2b16e7.tar.bz2
[Ada] Part of implementation of AI12-0212: container aggregates
gcc/ada/ * aspects.ads: Add Aspect_Aggregate. * exp_aggr.adb (Expand_Container_Aggregate): Expand positional container aggregates into separate initialization and insertion operations. * sem_aggr.ads (Resolve_Container_Aggregate): New subprogram. * sem_aggr.adb (Resolve_Container_Aggregate): Parse aspect aggregate, establish element types and key types if present, and resolve aggregate components. * sem_ch13.ads (Parse_Aspect_Aggregate): Public subprogram used in validation, resolution and expansion of container aggregates * sem_ch13.adb (Parse_Aspect_Aggregate): Retrieve names of primitives specified in aspect specification. (Validate_Aspect_Aggregate): Check legality of specified operations given in aspect specification, before nane resolution. (Resolve_Aspect_Aggregate): At freeze point resolve operations and verify that given operations have the required profile. * sem_res.adb (Resolve): Call Resolve_Aspect_Aggregate if aspect is present for type. * snames.ads-tmpl: Add names used in aspect Aggregate: Empty, Add_Named, Add_Unnamed, New_Indexed, Assign_Indexed.
Diffstat (limited to 'gcc/ada/sem_ch13.ads')
-rw-r--r--gcc/ada/sem_ch13.ads11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch13.ads b/gcc/ada/sem_ch13.ads
index 85063a6..a08a1f4 100644
--- a/gcc/ada/sem_ch13.ads
+++ b/gcc/ada/sem_ch13.ads
@@ -128,6 +128,17 @@ package Sem_Ch13 is
-- If the size is too small, and an error message is given, then both
-- Esize and RM_Size are reset to the allowed minimum value in T.
+ procedure Parse_Aspect_Aggregate
+ (N : Node_Id;
+ Empty_Subp : in out Node_Id;
+ Add_Named_Subp : in out Node_Id;
+ Add_Unnamed_Subp : in out Node_Id;
+ New_Indexed_Subp : in out Node_Id;
+ Assign_Indexed_Subp : in out Node_Id);
+ -- Utility to unpack the subprogramz in an occurrence of asoect Aggregate,
+ -- used to verify the structure of the asoect, and resolve and expand an
+ -- aggregate for a container type that carries the asoect.
+
function Rep_Item_Too_Early (T : Entity_Id; N : Node_Id) return Boolean;
-- Called at start of processing a representation clause/pragma. Used to
-- check that the representation item is not being applied to an incomplete