public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3739] [Ada] exp_pakd.adb: work around spurious Codepeer warnings
@ 2021-09-21 15:26 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-09-21 15:26 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:cf7aa7d8e8523ca246804ba7c8ef6ab4c7910cb8
commit r12-3739-gcf7aa7d8e8523ca246804ba7c8ef6ab4c7910cb8
Author: Ghjuvan Lacambre <lacambre@adacore.com>
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-21 15:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 15:26 [gcc r12-3739] [Ada] exp_pakd.adb: work around spurious Codepeer warnings Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).