From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id C20D03857C5D; Tue, 21 Sep 2021 15:26:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C20D03857C5D 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-3739] [Ada] exp_pakd.adb: work around spurious Codepeer warnings X-Act-Checkin: gcc X-Git-Author: Ghjuvan Lacambre X-Git-Refname: refs/heads/master X-Git-Oldrev: 69a0ff3416a5bbd8abcdd3fb85a387b2eccc88dc X-Git-Newrev: cf7aa7d8e8523ca246804ba7c8ef6ab4c7910cb8 Message-Id: <20210921152649.C20D03857C5D@sourceware.org> Date: Tue, 21 Sep 2021 15:26:49 +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: Tue, 21 Sep 2021 15:26:49 -0000 https://gcc.gnu.org/g:cf7aa7d8e8523ca246804ba7c8ef6ab4c7910cb8 commit r12-3739-gcf7aa7d8e8523ca246804ba7c8ef6ab4c7910cb8 Author: Ghjuvan Lacambre Date: Mon Jul 5 17:08:56 2021 +0200 [Ada] exp_pakd.adb: work around spurious Codepeer warnings gcc/ada/ * exp_pakd.adb (Expand_Packed_Not): Replace expression with statement. Diff: --- gcc/ada/exp_pakd.adb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ada/exp_pakd.adb b/gcc/ada/exp_pakd.adb index 9b118138561..779dbb3ad30 100644 --- a/gcc/ada/exp_pakd.adb +++ b/gcc/ada/exp_pakd.adb @@ -2002,7 +2002,11 @@ package body Exp_Pakd is -- actual subtype of the operand. Preserve old behavior in case size is -- not set. - Size := (if Known_RM_Size (PAT) then RM_Size (PAT) else Uint_0); + if Known_RM_Size (PAT) then + Size := RM_Size (PAT); + else + Size := Uint_0; + end if; Lit := Make_Integer_Literal (Loc, 2 ** Size - 1); Set_Print_In_Hex (Lit);