[COMMITTED,06/31] ada: Fix comments about Subprogram_Variant and Exceptional_Cases

Message ID 20250107125350.619654-6-poulhies@adacore.com
State New
Headers
Series [COMMITTED,01/31] ada: Restrict previous change made to expansion of allocators |

Commit Message

Marc Poulhiès Jan. 7, 2025, 12:53 p.m. UTC
  From: Piotr Trojanek <trojanek@adacore.com>

The comment about Subprogram_Variant was outdated after more types have been
allowed by the corresponding SPARK RM rule; the comment about Exceptional_Cases
was incorrect, after being copy-pasted.

gcc/ada/ChangeLog:

	* sem_prag.adb (Analyze_Exceptional_Contract, Analyze_Variant): Fix
	comments.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sem_prag.adb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
  

Patch

diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 5b5ff320e80..04202873974 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -2320,8 +2320,7 @@  package body Sem_Prag is
 
          Errors := Serious_Errors_Detected;
 
-         --  Preanalyze_Assert_Expression, but without enforcing any of the two
-         --  acceptable types.
+         --  Preanalyze_Assert_Expression enforcing the expression type
 
          Preanalyze_Assert_Expression (Consequence, Any_Boolean);
 
@@ -31380,7 +31379,7 @@  package body Sem_Prag is
 
          Errors := Serious_Errors_Detected;
 
-         --  Preanalyze_Assert_Expression, but without enforcing any of the two
+         --  Preanalyze_Assert_Expression, but without enforcing any of the
          --  acceptable types.
 
          Preanalyze_Assert_Expression (Expr);