From f9e0e67b260f55fc05c7ffe01217561ac3f2aef4 Mon Sep 17 00:00:00 2001
From: Ronan Desplanques <desplanques@adacore.com>
Date: Thu, 12 Oct 2023 11:31:40 +0200
Subject: [PATCH] ada: Fix documentation of -gnatwc

-gnatwc has been correctly emitting warnings for expressions outside
of tests for a while, but its documentation in the user's guide had
never been updated to reflect that. Also, the documentation used
"conditional expressions" to designate boolean expressions, but
"conditional expressions" has been defined by Ada 2012 to designate
if expressions and case expressions. This patch fixes those issues.

gcc/ada/

	* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
	-gnatwc documentation.
	* gnat_ugn.texi: Regenerate.
---
 .../doc/gnat_ugn/building_executable_programs_with_gnat.rst   | 4 ++--
 gcc/ada/gnat_ugn.texi                                         | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
index a708ef4b995f..21e277d5916f 100644
--- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
+++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
@@ -2942,8 +2942,8 @@ of the pragma in the :title:`GNAT_Reference_manual`).
 
   .. index:: Conditionals, constant
 
-  This switch activates warnings for conditional expressions used in
-  tests that are known to be True or False at compile time. The default
+  This switch activates warnings for boolean expressions that are known to
+  be True or False at compile time. The default
   is that such warnings are not generated.
   Note that this warning does
   not get issued for the use of boolean constants whose
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 1d91f2c13fa5..78f8849e379b 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -11000,8 +11000,8 @@ of biased representation.
 @geindex Conditionals
 @geindex constant
 
-This switch activates warnings for conditional expressions used in
-tests that are known to be True or False at compile time. The default
+This switch activates warnings for boolean expressions that are known to
+be True or False at compile time. The default
 is that such warnings are not generated.
 Note that this warning does
 not get issued for the use of boolean constants whose
-- 
GitLab