]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Apply -gnatw.j warning switch correctly in a message
authorViljar Indus <indus@adacore.com>
Thu, 4 Jun 2026 12:07:08 +0000 (15:07 +0300)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 18 Jun 2026 08:03:44 +0000 (10:03 +0200)
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.

gcc/ada/sem_disp.adb

index f69e7959ee52c3b22c187549b6c9b220ab99dee2..c093d1122d0eff92a99cb30a8a74930dd8ed1cd9 100644 (file)
@@ -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