[Ada] Enable delta_aggregate only in Ada 2020 mode

Programming / Compilers / GCC - pmderodat [138bc75d-0d04-0410-961f-82ee72b054a4] - 20 August 2019 09:49 EDT

If the delta_aggregate feature is used, the -gnat2020 or -gnatX switch must be given.

The following test must get an error if neither-gnat2020 nor -gnatX is specified:

gcc -c delta_aggregate.ads -gnat2012

delta_aggregate.ads:4:18: delta_aggregate is an Ada 202x feature delta_aggregate.ads:4:18: compile with -gnatX

package Delta_Aggregate is

X : String := "Hello"; Y : String := (X with delta 1 => 'h');

end Delta_Aggregate;

2019-08-20 Bob Duff

gcc/ada/

- par-ch4.adb: Minor wording change in error messages.
- sem_aggr.adb (Resolve_Delta_Aggregate): Emit an error for Ada
versions prior to Ada 2020.

c1af2733e5f [Ada] Enable delta_aggregate only in Ada 2020 mode
gcc/ada/ChangeLog | 6 ++++++
gcc/ada/par-ch4.adb | 4 ++--
gcc/ada/sem_aggr.adb | 5 +++++
3 files changed, 13 insertions(+), 2 deletions(-)

Upstream: gcc.gnu.org


  • Share