public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-845] [Ada] Add insertion character for overlay modification warnings
@ 2022-05-30  8:31 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-30  8:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:94cf3d1f78d727cc30d526bf175eb72c6e3344b2

commit r13-845-g94cf3d1f78d727cc30d526bf175eb72c6e3344b2
Author: Ghjuvan Lacambre <lacambre@adacore.com>
Date:   Tue Apr 26 09:50:24 2022 +0200

    [Ada] Add insertion character for overlay modification warnings
    
    This enables tools that ingest GNAT's output to properly classify these
    messages.
    
    gcc/ada/
    
            * freeze.adb (Warn_Overlay): Add 'o' insertion character.
            * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Likewise.
            * sem_util.adb (Note_Possible_Modifications): Likewise.

Diff:
---
 gcc/ada/freeze.adb   | 6 +++---
 gcc/ada/sem_ch13.adb | 2 +-
 gcc/ada/sem_util.adb | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 0301bf43b15..f4ebf300a19 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -789,7 +789,7 @@ package body Freeze is
                then
                   Error_Msg_Sloc := Sloc (Addr);
                   Error_Msg_NE
-                    ("??constant& may be modified via address clause#",
+                    ("?o?constant& may be modified via address clause#",
                      Decl, O_Ent);
                end if;
             end;
@@ -10638,11 +10638,11 @@ package body Freeze is
          if Present (Old) then
             Error_Msg_Node_2 := Old;
             Error_Msg_N
-              ("default initialization of & may modify &??",
+              ("default initialization of & may modify &?o?",
                Nam);
          else
             Error_Msg_N
-              ("default initialization of & may modify overlaid storage??",
+              ("default initialization of & may modify overlaid storage?o?",
                Nam);
          end if;
 
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 6ca69e54cd0..fdc767e803b 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -6705,7 +6705,7 @@ package body Sem_Ch13 is
                     and then not Overlays_Constant (U_Ent)
                     and then Address_Clause_Overlay_Warnings
                   then
-                     Error_Msg_N ("??constant overlays a variable", Expr);
+                     Error_Msg_N ("?o?constant overlays a variable", Expr);
 
                   --  Imported variables can have an address clause, but then
                   --  the import is pretty meaningless except to suppress
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 1d527bc02e6..7cfd5f4aa97 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -25893,7 +25893,7 @@ package body Sem_Util is
 
                   Error_Msg_Sloc := Sloc (Addr);
                   Error_Msg_NE
-                    ("??constant& may be modified via address clause#",
+                    ("?o?constant& may be modified via address clause#",
                      N, O_Ent);
                end;
             end if;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-30  8:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30  8:31 [gcc r13-845] [Ada] Add insertion character for overlay modification warnings Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).