[COMMITTED] ada: Fix documentation of -gnatwc

Message ID 20231107092009.3906170-1-poulhies@adacore.com
State Accepted
Headers
Series [COMMITTED] ada: Fix documentation of -gnatwc |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Marc Poulhiès Nov. 7, 2023, 9:20 a.m. UTC
  From: Ronan Desplanques <desplanques@adacore.com>

-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.

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

---
 .../doc/gnat_ugn/building_executable_programs_with_gnat.rst   | 4 ++--
 gcc/ada/gnat_ugn.texi                                         | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
  

Patch

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 a708ef4b995..21e277d5916 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 1d91f2c13fa..78f8849e379 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