[gcc r15-1476] ada: Change messages for -gnatw.v to warnings

Marc Poulhi?s dkm@gcc.gnu.org
Thu Jun 20 08:53:30 GMT 2024


https://gcc.gnu.org/g:23c332e2a56dc93e3c00e745e08396762a33204e

commit r15-1476-g23c332e2a56dc93e3c00e745e08396762a33204e
Author: Viljar Indus <indus@adacore.com>
Date:   Mon May 13 11:53:45 2024 +0300

    ada: Change messages for -gnatw.v to warnings
    
    Previously this switch was emitting only info messages
    which was both confusing in terms of the name of the
    switch that was used internally and externally.
    
    gcc/ada/
    
            * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update
            documentation for -gnatw.v.
            * sem_ch13.adb: Convert all -gnatw.v related messages to warnings.
            * gnat_ugn.texi: Regenerate.

Diff:
---
 .../gnat_ugn/building_executable_programs_with_gnat.rst | 17 ++++++++---------
 gcc/ada/gnat_ugn.texi                                   | 17 ++++++++---------
 gcc/ada/sem_ch13.adb                                    | 10 +++++-----
 3 files changed, 21 insertions(+), 23 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 d30bb7e9d8e0..ce3ed0cc65a0 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
@@ -3997,22 +3997,21 @@ of the pragma in the :title:`GNAT_Reference_manual`).
 .. index:: bit order warnings
 
 :switch:`-gnatw.v`
-  *Activate info messages for non-default bit order.*
+  *Activate warnings for non-default bit order.*
 
-  This switch activates messages (labeled "info", they are not warnings,
-  just informational messages) about the effects of non-default bit-order
-  on records to which a component clause is applied. The effect of specifying
-  non-default bit ordering is a bit subtle (and changed with Ada 2005), so
-  these messages, which are given by default, are useful in understanding the
-  exact consequences of using this feature.
+  This switch activates warning messages about the effects of non-default
+  bit-order on records to which a component clause is applied. The effect of
+  specifying non-default bit ordering is a bit subtle
+  (and changed with Ada 2005), so these messages, which are given by default,
+  are useful in understanding the exact consequences of using this feature.
 
 
 .. index:: -gnatw.V  (gcc)
 
 :switch:`-gnatw.V`
-  *Suppress info messages for non-default bit order.*
+  *Suppress warnings for non-default bit order.*
 
-  This switch suppresses information messages for the effects of specifying
+  This switch suppresses warnings for the effects of specifying
   non-default bit order on record components with component clauses.
 
 
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 95e21405f02b..bba4f25aa13c 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -12462,14 +12462,13 @@ may not be properly initialized.
 
 @item @code{-gnatw.v}
 
-`Activate info messages for non-default bit order.'
+`Activate warnings for non-default bit order.'
 
-This switch activates messages (labeled “info”, they are not warnings,
-just informational messages) about the effects of non-default bit-order
-on records to which a component clause is applied. The effect of specifying
-non-default bit ordering is a bit subtle (and changed with Ada 2005), so
-these messages, which are given by default, are useful in understanding the
-exact consequences of using this feature.
+This switch activates warning messages about the effects of non-default
+bit-order on records to which a component clause is applied. The effect of
+specifying non-default bit ordering is a bit subtle
+(and changed with Ada 2005), so these messages, which are given by default,
+are useful in understanding the exact consequences of using this feature.
 @end table
 
 @geindex -gnatw.V (gcc)
@@ -12479,9 +12478,9 @@ exact consequences of using this feature.
 
 @item @code{-gnatw.V}
 
-`Suppress info messages for non-default bit order.'
+`Suppress warnings for non-default bit order.'
 
-This switch suppresses information messages for the effects of specifying
+This switch suppresses warnings for the effects of specifying
 non-default bit order on record components with component clauses.
 @end table
 
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index cd47f734462a..a35b67eddc82 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -508,7 +508,7 @@ package body Sem_Ch13 is
 
                      if Warn_On_Reverse_Bit_Order then
                         Error_Msg_N
-                          ("info: multi-byte field specified with "
+                          ("multi-byte field specified with "
                            & "non-standard Bit_Order?.v?", CC);
 
                         if Bytes_Big_Endian then
@@ -732,7 +732,7 @@ package body Sem_Ch13 is
                   then
                      Error_Msg_Uint_1 := MSS;
                      Error_Msg_N
-                       ("info: reverse bit order in machine scalar of "
+                       ("reverse bit order in machine scalar of "
                         & "length^?.v?", First_Bit (CC));
                      Error_Msg_Uint_1 := NFB;
                      Error_Msg_Uint_2 := NLB;
@@ -808,7 +808,7 @@ package body Sem_Ch13 is
                     and then CSZ mod System_Storage_Unit = 0
                   then
                      Error_Msg_N
-                       ("info: multi-byte field specified with non-standard "
+                       ("multi-byte field specified with non-standard "
                         & "Bit_Order?.v?", CLC);
 
                      if Bytes_Big_Endian then
@@ -841,13 +841,13 @@ package body Sem_Ch13 is
                     and then Warn_On_Reverse_Bit_Order
                   then
                      Error_Msg_N
-                       ("info: Bit_Order clause does not affect byte "
+                       ("Bit_Order clause does not affect byte "
                         & "ordering?.v?", Pos);
                      Error_Msg_Uint_1 :=
                        Intval (Pos) + Intval (FB) /
                        System_Storage_Unit;
                      Error_Msg_N
-                       ("info: position normalized to ^ before bit order "
+                       ("position normalized to ^ before bit order "
                         & "interpreted?.v?", Pos);
                   end if;


More information about the Gcc-cvs mailing list