diff options
author | Ronan Desplanques <desplanques@adacore.com> | 2024-06-19 09:26:35 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-08-01 17:14:34 +0200 |
commit | a9302802e56547ba14e8bdd7bbf667bb3a253155 (patch) | |
tree | f9a5f9e31751c517ad23d41a9c992167b1786192 /gcc/ada/sem_ch3.adb | |
parent | f61d9979a75b171a917ffcd03da5e4e5f62bcc50 (diff) | |
download | gcc-a9302802e56547ba14e8bdd7bbf667bb3a253155.zip gcc-a9302802e56547ba14e8bdd7bbf667bb3a253155.tar.gz gcc-a9302802e56547ba14e8bdd7bbf667bb3a253155.tar.bz2 |
ada: Allow making empty aggregates positional
This patch makes Exp_Aggr.Convert_To_Positional accepts appropriate
empty aggregates. The end goal is to remove violations of the
No_Elaboration_Code restriction in some cases of library-level array
objects.
gcc/ada/
* exp_aggr.adb (Flatten): Do not reject empty aggregates. Adjust
criterion for emitting warning about ineffective others clause.
* sem_aggr.adb (Array_Aggr_Subtype): Fix typo. Add handling of
aggregates that were converted to positional form.
(Resolve_Aggregate): Tweak criterion for transforming into a
string literal.
(Resolve_Array_Aggregate): Tweak criterion for reusing existing
bounds of aggregate.
(Retrieve_Aggregate_Bounds): New procedure.
* sem_util.adb (Has_Static_Empty_Array_Bounds): New function.
* sem_util.ads (Has_Static_Empty_Array_Bounds): Likewise.
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
0 files changed, 0 insertions, 0 deletions