]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Relax null exclusion mismatch check in Relaxed_RM_Semantics mode
authorArnaud Charlet <charlet@adacore.com>
Mon, 15 Mar 2021 07:45:35 +0000 (03:45 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 18 Jun 2021 08:36:46 +0000 (04:36 -0400)
gcc/ada/

* sem_ch6.adb (Null_Exclusions_Match): Relax null exclusion
mismatch check when Relaxed_RM_Semantics is set.

gcc/ada/sem_ch6.adb

index 7bca9df72257e8af48b6983a763b8f231f0f9af6..d46d3f30326ec928ab2f860c26cfa1cf7967b363 100644 (file)
@@ -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);