public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1533] [Ada] Do not give warnings for compiler-generated entities by default
@ 2022-07-06 13:31 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-07-06 13:31 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:889db59e6e77abf5253c8355d6a5ccbdfe42d3ec
commit r13-1533-g889db59e6e77abf5253c8355d6a5ccbdfe42d3ec
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue May 24 01:39:08 2022 +0200
[Ada] Do not give warnings for compiler-generated entities by default
gcc/ada/
* gcc-interface/trans.cc (gnat_gimplify_expr) <SAVE_EXPR>: New case.
Diff:
---
gcc/ada/gcc-interface/trans.cc | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index f0602b824b0..758df38c1c8 100644
--- a/gcc/ada/gcc-interface/trans.cc
+++ b/gcc/ada/gcc-interface/trans.cc
@@ -8731,6 +8731,17 @@ gnat_gimplify_expr (tree *expr_p, gimple_seq *pre_p,
gimplify_and_add (TREE_OPERAND (expr, 0), pre_p);
return GS_OK;
+ case SAVE_EXPR:
+ op = TREE_OPERAND (expr, 0);
+
+ /* Propagate TREE_NO_WARNING from expression to temporary by using the
+ SAVE_EXPR itself as an intermediate step. See gimplify_save_expr. */
+ if (SAVE_EXPR_RESOLVED_P (expr))
+ TREE_NO_WARNING (op) = TREE_NO_WARNING (expr);
+ else
+ TREE_NO_WARNING (expr) = TREE_NO_WARNING (op);
+ break;
+
case UNCONSTRAINED_ARRAY_REF:
/* We should only do this if we are just elaborating for side effects,
but we can't know that yet. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-06 13:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06 13:31 [gcc r13-1533] [Ada] Do not give warnings for compiler-generated entities by default 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).