summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch6.ads
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2021-06-03 12:10:30 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2021-07-08 13:34:23 +0000
commit7c092960f0d116abdba7e13aaf38fbadfdefbeb0 (patch)
tree5212d98fc41671e89ba1ecb386fb4267bf0159af /gcc/ada/exp_ch6.ads
parent6e8b502cb6c3e30ac59fc446b2e765e5b5a9d5a6 (diff)
downloadgcc-7c092960f0d116abdba7e13aaf38fbadfdefbeb0.tar.gz
[Ada] Transient scope cleanup
gcc/ada/ * comperr.adb (Compiler_Abort): Call Sinput.Unlock, because if this is called late, then Source_Dump would crash otherwise. * debug.adb: Correct documentation of the -gnatd.9 switch. * exp_ch4.adb (Expand_Allocator_Expression): Add a comment. * exp_ch6.adb: Minor comment fixes. Add assertion. * exp_ch6.ads (Is_Build_In_Place_Result_Type): Correct comment. * exp_ch7.adb, checks.ads: Minor comment fixes.
Diffstat (limited to 'gcc/ada/exp_ch6.ads')
-rw-r--r--gcc/ada/exp_ch6.ads7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch6.ads b/gcc/ada/exp_ch6.ads
index 07a88c55c3c..76cec4d4e47 100644
--- a/gcc/ada/exp_ch6.ads
+++ b/gcc/ada/exp_ch6.ads
@@ -134,8 +134,11 @@ package Exp_Ch6 is
--
-- For inherently limited types in Ada 2005, True means that calls will
-- actually be build-in-place in all cases. For other types, build-in-place
- -- will be used when possible, but we need to make a copy at the call site
- -- in some cases, notably assignment statements.
+ -- will be used when possible, but we need to make a copy in some
+ -- cases. For example, for "X := F(...);" if F can see X, or if F can
+ -- propagate exceptions, we need to store its result in a temp in general,
+ -- and copy the temp into X. Also, for "return Global_Var;" Global_Var
+ -- needs to be copied into the function result object.
function Is_Build_In_Place_Function (E : Entity_Id) return Boolean;
-- Ada 2005 (AI-318-02): Returns True if E denotes a function, generic