]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Ada: Fix wrong tag in style check warnings
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 21 Jul 2025 18:27:37 +0000 (20:27 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 21 Jul 2025 18:31:59 +0000 (20:31 +0200)
This fixes an old issue whereby violations of the style check -gnatyc are
sometimes reported as violations of -gnatyt instead.

gcc/ada/
PR ada/121184
* styleg.adb (Check_Comment): Use consistent warning message.

gcc/ada/styleg.adb

index 7b7f2524d924516d3b63ab1839999de3f0924de5..20945fbb65f758c47306aa47d0dad1c4ba94b7a9 100644 (file)
@@ -499,7 +499,8 @@ package body Styleg is
                   if Is_Box_Comment
                     or else Style_Check_Comments_Spacing = 1
                   then
-                     Error_Space_Required (Scan_Ptr + 2);
+                     Error_Msg -- CODEFIX
+                       ("(style) space required?c?", Scan_Ptr + 2);
                   else
                      Error_Msg -- CODEFIX
                        ("(style) two spaces required?c?", Scan_Ptr + 2);
@@ -526,7 +527,8 @@ package body Styleg is
          --  box comment.
 
          elsif not Is_Box_Comment then
-            Error_Space_Required (Scan_Ptr + 3);
+            Error_Msg -- CODEFIX
+              ("(style) space required?c?", Scan_Ptr + 3);
          end if;
       end if;
    end Check_Comment;