diff options
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r-- | gcc/ada/sem_ch4.adb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 798a80c2403..e122af79423 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -342,6 +342,10 @@ package body Sem_Ch4 is and then Comes_From_Source (N) and then not In_Instance_Body then + -- Ada0Y (AI-287): Do not post an error if the expression corres- + -- ponds to a limited aggregate. Limited aggregates are checked in + -- sem_aggr in a per-component manner (cf. Get_Value subprogram). + if Extensions_Allowed and then Nkind (Expression (E)) = N_Aggregate then @@ -3442,6 +3446,9 @@ package body Sem_Ch4 is Actual := First_Actual (N); while Present (Actual) loop + -- Ada0Y (AI-50217): Post an error in case of premature usage of + -- an entity from the limited view. + if not Analyzed (Etype (Actual)) and then From_With_Type (Etype (Actual)) then |