https://gcc.gnu.org/g:cdcd73d85940d1554a882efeb3331edaecbb411c

commit r17-1646-gcdcd73d85940d1554a882efeb3331edaecbb411c
Author: Viljar Indus <[email protected]>
Date:   Thu Jun 4 15:07:08 2026 +0300

    ada: Apply -gnatw.j warning switch correctly in a message
    
    The error message here was using both ?.*? and ? warning
    inseriton characters where the latter would override the first.
    
    gcc/ada/ChangeLog:
    
            * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
            apply warning character correctly.

Diff:
---
 gcc/ada/sem_disp.adb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb
index f69e7959ee52..c093d1122d0e 100644
--- a/gcc/ada/sem_disp.adb
+++ b/gcc/ada/sem_disp.adb
@@ -1243,7 +1243,7 @@ package body Sem_Disp is
                   Error_Msg_Sloc := Sloc (E);
                   Error_Msg_N
                     ("?.j?primitive of type % defined after private extension "
-                     & "% #?", Prim);
+                     & "% #", Prim);
                   Error_Msg_Name_1 := Chars (Prim);
                   Error_Msg_Name_2 := Chars (E);
                   Error_Msg_N

Reply via email to