diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-05-06 16:56:41 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-06-01 08:43:18 +0000 |
commit | 8182602c5061ddc9c329ecef26a7fd77b9264ec0 (patch) | |
tree | 3b9653f39ce00bca7cb18cc5188634a6911c1094 /gcc | |
parent | dbb0c80c36033590f8ad63ea1cdaabcf79c52fd3 (diff) | |
download | gcc-8182602c5061ddc9c329ecef26a7fd77b9264ec0.zip gcc-8182602c5061ddc9c329ecef26a7fd77b9264ec0.tar.gz gcc-8182602c5061ddc9c329ecef26a7fd77b9264ec0.tar.bz2 |
[Ada] Add a comment about a finalization issue
gcc/ada/
* sem_ch5.adb (Analyze_Loop_Statement): Add a comment about
a finalization issue.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_ch5.adb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index 66315ad..f430139 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; |