[Ada] exp_pakd.adb: work around spurious Codepeer warnings
authorGhjuvan Lacambre <lacambre@adacore.com>
Mon, 5 Jul 2021 15:08:56 +0000 (17:08 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 21 Sep 2021 15:24:58 +0000 (15:24 +0000)
gcc/ada/

* exp_pakd.adb (Expand_Packed_Not): Replace expression with
statement.

gcc/ada/exp_pakd.adb

index 9b11813..779dbb3 100644 (file)
@@ -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);