public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-893] [Ada] Add a comment about a finalization issue
@ 2022-06-01 8:45 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-06-01 8:45 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:8182602c5061ddc9c329ecef26a7fd77b9264ec0
commit r13-893-g8182602c5061ddc9c329ecef26a7fd77b9264ec0
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Fri May 6 16:56:41 2022 +0200
[Ada] Add a comment about a finalization issue
gcc/ada/
* sem_ch5.adb (Analyze_Loop_Statement): Add a comment about
a finalization issue.
Diff:
---
gcc/ada/sem_ch5.adb | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 66315ad385e..f4301397881 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -4056,6 +4056,12 @@ package body Sem_Ch5 is
-- range requires the secondary stack. In this case the loop is
-- wrapped within a block in order to manage the secondary stack.
+ -- ??? This overlooks finalization: the loop may leave the secondary
+ -- stack untouched, but its iterator or discrete range may need
+ -- finalization, in which case the block is also required. Therefore
+ -- the criterion must be based on Sem_Util.Requires_Transient_Scope,
+ -- which happens to be what is currently implemented.
+
if Present (Iter) then
declare
Stop_Processing : Boolean;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-01 8:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 8:45 [gcc r13-893] [Ada] Add a comment about a finalization issue 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).