From: Viljar Indus <in...@adacore.com>

Previously the messages produced by this warning switch
were info messages that were suppressed with the same
methods as regular warnings. Since info messages are now
separated as a completely different class of messages then
these messages should be converted back to warnings in order
for the previous pragma based suppression methods to work.

gcc/ada/

        * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update
        documentation for -gnatw.n switch.
        * exp_util.adb: Convert info messages into warnings.
        * gnat_ugn.texi: Regenerate.

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

---
 .../building_executable_programs_with_gnat.rst       | 12 +++++++-----
 gcc/ada/exp_util.adb                                 |  4 ++--
 gcc/ada/gnat_ugn.texi                                | 10 +++++-----
 3 files changed, 14 insertions(+), 12 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 8fbb1eeef4f..d30bb7e9d8e 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
@@ -3495,20 +3495,20 @@ of the pragma in the :title:`GNAT_Reference_manual`).
 .. index:: Atomic Synchronization, warnings
 
 :switch:`-gnatw.n`
-  *Activate info messages on atomic synchronization.*
+  *Activate warnings on atomic synchronization.*
 
-  This switch activates info messages when an access to an atomic variable
+  This switch activates warnings when an access to an atomic variable
   requires the generation of atomic synchronization code. These
-  info messages are off by default.
+  warnings are off by default.
 
 .. index:: -gnatw.N  (gcc)
 
 :switch:`-gnatw.N`
-  *Suppress info messages on atomic synchronization.*
+  *Suppress warnings on atomic synchronization.*
 
   .. index:: Atomic Synchronization, warnings
 
-  This switch suppresses info messages when an access to an atomic variable
+  This switch suppresses warnings when an access to an atomic variable
   requires the generation of atomic synchronization code.
 
 
@@ -4372,6 +4372,8 @@ When no switch :switch:`-gnatw` is used, this is 
equivalent to:
 
 .. _Debugging_and_Assertion_Control:
 
+
+
 Info message Control
 --------------------
 
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 528001ea70a..7a756af97ea 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -299,10 +299,10 @@ package body Exp_Util is
 
          if Present (Msg_Node) then
             Error_Msg_N
-              ("info: atomic synchronization set for &?.n?", Msg_Node);
+              ("atomic synchronization set for &?.n?", Msg_Node);
          else
             Error_Msg_N
-              ("info: atomic synchronization set?.n?", N);
+              ("atomic synchronization set?.n?", N);
          end if;
       end if;
    end Activate_Atomic_Synchronization;
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index fe83913951d..95e21405f02 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -11757,11 +11757,11 @@ use of @code{-gnatg}.
 
 @item @code{-gnatw.n}
 
-`Activate info messages on atomic synchronization.'
+`Activate warnings on atomic synchronization.'
 
-This switch activates info messages when an access to an atomic variable
+This switch activates warnings when an access to an atomic variable
 requires the generation of atomic synchronization code. These
-info messages are off by default.
+warnings are off by default.
 @end table
 
 @geindex -gnatw.N (gcc)
@@ -11771,12 +11771,12 @@ info messages are off by default.
 
 @item @code{-gnatw.N}
 
-`Suppress info messages on atomic synchronization.'
+`Suppress warnings on atomic synchronization.'
 
 @geindex Atomic Synchronization
 @geindex warnings
 
-This switch suppresses info messages when an access to an atomic variable
+This switch suppresses warnings when an access to an atomic variable
 requires the generation of atomic synchronization code.
 @end table
 
-- 
2.45.1

Reply via email to