]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Allow initialization of limited objects with delta aggregates
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 14 Oct 2021 21:24:54 +0000 (23:24 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 8 Nov 2022 08:34:58 +0000 (09:34 +0100)
Objects of a limited type can be initialized with "aggregates", which is
a collective term for ordinary aggregates (i.e. record aggregates and
array aggregates), extension aggregates and finally for delta
aggregates (introduced by Ada 2022).

gcc/ada/

* sem_ch3.adb (OK_For_Limited_Init_In_05): Handle delta aggregates
just like other aggregates.

gcc/ada/sem_ch3.adb

index 76dc632506079d5d14594d25369b98429e4f87ec..f6b852051dcd85652c34c4915dc71050bb22081a 100644 (file)
@@ -20145,6 +20145,7 @@ package body Sem_Ch3 is
 
       case Nkind (Original_Node (Exp)) is
          when N_Aggregate
+            | N_Delta_Aggregate
             | N_Extension_Aggregate
             | N_Function_Call
             | N_Op