From d983a9d0500d69d9eda24ac155d7d7c6fed628a2 Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Tue, 17 Nov 2020 16:04:34 +0100 Subject: [PATCH] [Ada] Fix warning control character for message on IN OUT parameter gcc/ada/ * sem_warn.adb (Output_Non_Modified_In_Out_Warnings): Use right warning control character 'k' in both comment and call to Errout_Msg_N. --- gcc/ada/sem_warn.adb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb index 7289ea78e45..d92975f4a5e 100644 --- a/gcc/ada/sem_warn.adb +++ b/gcc/ada/sem_warn.adb @@ -3077,14 +3077,14 @@ package body Sem_Warn is -- Here we generate the warning else - -- If -gnatwc is set then output message that we could be IN + -- If -gnatwk is set then output message that we could be IN if not Is_Trivial_Subprogram (Scope (E1)) then if Warn_On_Constant then Error_Msg_N - ("?u?formal parameter & is not modified!", E1); + ("?k?formal parameter & is not modified!", E1); Error_Msg_N - ("\?u?mode could be IN instead of `IN OUT`!", E1); + ("\?k?mode could be IN instead of `IN OUT`!", E1); -- We do not generate warnings for IN OUT parameters -- unless we have at least -gnatwu. This is deliberately -- 2.30.2