diff options
Diffstat (limited to 'gcc/ada/sem_aggr.adb')
| -rw-r--r-- | gcc/ada/sem_aggr.adb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index baca068..8e079f6 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -1136,10 +1136,17 @@ package body Sem_Aggr is begin Error_Msg_Warn := SPARK_Mode /= On; - if Is_Modular_Integer_Type (Index_Typ) then + if Has_Modular_Operations (Index_Typ) then Error_Msg_N ("null array aggregate indexed by a modular type<<", N); + elsif Is_Modular_Integer_Type (Index_Typ) + and then Has_Unsigned_Base_Range_Aspect (Base_Type (Index_Typ)) + then + Error_Msg_N + ("null array aggregate indexed by an unsigned base range type<<", + N); + elsif Is_Enumeration_Type (Index_Typ) then Error_Msg_N ("null array aggregate indexed by an enumeration type<<", N); |
