This fixes an old issue whereby violations of the style check -gnatyc are
sometimes reported as violations of -gnatyt instead.
Tested on x86-64/Linux, applied on the mainline and 15 branch.
2025-07-21 Eric Botcazou <ebotca...@adacore.com>
PR ada/121184
* styleg.adb (Check_Comment): Use consistent warning message.
--
Eric Botcazou
diff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb
index 7b7f2524d92..20945fbb65f 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;