https://gcc.gnu.org/g:363950a80d3d9848f89441ac00fc2915f123171f
commit r17-1694-g363950a80d3d9848f89441ac00fc2915f123171f Author: Viljar Indus <[email protected]> Date: Fri Jun 5 09:47:31 2026 +0000 ada: Add missing diagnostic ids for restriction messages gcc/ada/ChangeLog: * restrict.adb (Check_Restriction_No_Specification_Of_Aspect): add Diagnostic_Id for error message. (Check_Restriction_No_Use_Of_Attribute): Likewise. (Check_Restriction_No_Use_Of_Pragma): Likewise. Diff: --- gcc/ada/restrict.adb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/ada/restrict.adb b/gcc/ada/restrict.adb index d5525d7a374b..c66d81817bcc 100644 --- a/gcc/ada/restrict.adb +++ b/gcc/ada/restrict.adb @@ -651,7 +651,8 @@ package body Restrict is Error_Msg_Warn := No_Specification_Of_Aspect_Warning (A_Id); Error_Msg_N ("<*<violation of restriction `No_Specification_Of_Aspect '='> &`#", - Id); + Id, + Rest_To_Diag_Mappping (No_Specification_Of_Aspect)); end if; end Check_Restriction_No_Specification_Of_Aspect; @@ -697,7 +698,9 @@ package body Restrict is Error_Msg_Name_1 := Attr_Nam; Error_Msg_Warn := No_Use_Of_Attribute_Warning (Attr_Id); Error_Msg_N - ("<*<violation of restriction `No_Use_Of_Attribute '='> %` #", N); + ("<*<violation of restriction `No_Use_Of_Attribute '='> %` #", + N, + Rest_To_Diag_Mappping (Rident.No_Use_Of_Attribute)); end if; end Check_Restriction_No_Use_Of_Attribute; @@ -826,7 +829,9 @@ package body Restrict is if Error_Msg_Sloc /= No_Location then Error_Msg_Warn := No_Use_Of_Pragma_Warning (P_Id); Error_Msg_N - ("<*<violation of restriction `No_Use_Of_Pragma '='> &` #", Id); + ("<*<violation of restriction `No_Use_Of_Pragma '='> &` #", + Id, + Rest_To_Diag_Mappping (Rident.No_Use_Of_Pragma)); end if; end Check_Restriction_No_Use_Of_Pragma;
