From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id 04D893858002; Wed, 22 Sep 2021 15:10:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04D893858002 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3798] [Ada] Replace use of 'Image with use of Error_Msg_Uint X-Act-Checkin: gcc X-Git-Author: Ghjuvan Lacambre X-Git-Refname: refs/heads/master X-Git-Oldrev: 26ece6eca7c02675fcae29a1fa5285b740241d60 X-Git-Newrev: 4a3cb9e31936dda905082d9a27389c1622a3c55c Message-Id: <20210922151009.04D893858002@sourceware.org> Date: Wed, 22 Sep 2021 15:10:09 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2021 15:10:09 -0000 https://gcc.gnu.org/g:4a3cb9e31936dda905082d9a27389c1622a3c55c commit r12-3798-g4a3cb9e31936dda905082d9a27389c1622a3c55c Author: Ghjuvan Lacambre Date: Thu Jul 15 11:11:00 2021 +0200 [Ada] Replace use of 'Image with use of Error_Msg_Uint gcc/ada/ * sem_case.adb (Composite_Case_Ops): Replace 'Image with Error_Msg_Uint. Diff: --- gcc/ada/sem_case.adb | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb index cc7e988226d..31f14d5353d 100644 --- a/gcc/ada/sem_case.adb +++ b/gcc/ada/sem_case.adb @@ -1717,12 +1717,12 @@ package body Sem_Case is and then List_Length (Expressions (Expr)) /= Nat (Part_Id'Last) then + Error_Msg_Uint_1 := UI_From_Int + (List_Length (Expressions (Expr))); + Error_Msg_Uint_2 := UI_From_Int (Int (Part_Id'Last)); Error_Msg_N - ("Array aggregate length" - & List_Length (Expressions (Expr))'Image - & " does not match length of" - & " statically constrained case selector" - & Part_Id'Last'Image, Expr); + ("array aggregate length ^ does not match length " & + "of statically constrained case selector ^", Expr); return; end if; @@ -1761,12 +1761,13 @@ package body Sem_Case is if not Unconstrained_Array_Case and then Strlen /= Nat (Part_Id'Last) then + Error_Msg_Uint_1 := UI_From_Int (Strlen); + Error_Msg_Uint_2 := UI_From_Int + (Int (Part_Id'Last)); Error_Msg_N - ("String literal length" - & Strlen'Image - & " does not match length of" - & " statically constrained case selector" - & Part_Id'Last'Image, Expr); + ("String literal length ^ does not match length" & + " of statically constrained case selector ^", + Expr); return; end if;