aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch6.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2021-03-15 03:45:35 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2021-06-18 04:36:46 -0400
commit0becb0faaecc79df3de24bd5467b90cfd08a829a (patch)
tree46e632a90840d7d5b9aca1e3a413eb034094f22b /gcc/ada/sem_ch6.adb
parent5ddd01d6d41846eeb4b5e55351a4910841504510 (diff)
[Ada] Relax null exclusion mismatch check in Relaxed_RM_Semantics mode
gcc/ada/ * sem_ch6.adb (Null_Exclusions_Match): Relax null exclusion mismatch check when Relaxed_RM_Semantics is set.
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r--gcc/ada/sem_ch6.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 7bca9df7225..d46d3f30326 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -6265,7 +6265,9 @@ package body Sem_Ch6 is
-- Null exclusion must match
- if not Null_Exclusions_Match (Old_Formal, New_Formal) then
+ if not Relaxed_RM_Semantics
+ and then not Null_Exclusions_Match (Old_Formal, New_Formal)
+ then
Conformance_Error
("\null exclusion for& does not match", New_Formal);