https://gcc.gnu.org/g:0b6ae75a304e58463796d1058a39cbe483283dee

commit r16-2394-g0b6ae75a304e58463796d1058a39cbe483283dee
Author: Eric Botcazou <ebotca...@gcc.gnu.org>
Date:   Mon Jul 21 20:27:37 2025 +0200

    Ada: Fix wrong tag in style check warnings
    
    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.

Diff:
---
 gcc/ada/styleg.adb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb
index 7b7f2524d924..20945fbb65f7 100644
--- a/gcc/ada/styleg.adb
+++ b/gcc/ada/styleg.adb
@@ -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;

Reply via email to