summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-01-30 13:05:09 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-16 10:30:59 +0200
commite07e6ea6924e594b337ebf9cb175bc6b8e213923 (patch)
treecf6519bde1c802b9b9bf9032aa33df0b01f2cac0
parent5fa02009e49c5f6d8a187db4cb87405b3ef43b88 (diff)
downloadgcc-e07e6ea6924e594b337ebf9cb175bc6b8e213923.tar.gz
ada: Fix missing warning on aggregate with iterated component
This happens when the iterated component does not really iterate. gcc/ada/ * exp_aggr.adb (Expand_Array_Aggregate): Do not set Warnings_Off on the temporary created when in-place expansion is not possible.
-rw-r--r--gcc/ada/exp_aggr.adb1
1 files changed, 0 insertions, 1 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index cf8bac0f4bf..fe61e0ec90b 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -7068,7 +7068,6 @@ package body Exp_Aggr is
Defining_Identifier => Tmp,
Object_Definition => New_Occurrence_Of (Typ, Loc));
Set_No_Initialization (Tmp_Decl, True);
- Set_Warnings_Off (Tmp);
-- If we are within a loop, the temporary will be pushed on the
-- stack at each iteration. If the aggregate is the expression