diff options
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r-- | gcc/ada/sem_res.adb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 9a608981097..92ae30f4e55 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -906,10 +906,12 @@ package body Sem_Res is Expr := Original_Node (Expression (Parent (Comp))); -- Return True if the expression is a call to a function - -- (including an attribute function such as Image) with - -- a result that requires a transient scope. + -- (including an attribute function such as Image, or a + -- user-defined operator) with a result that requires a + -- transient scope. if (Nkind (Expr) = N_Function_Call + or else Nkind (Expr) in N_Op or else (Nkind (Expr) = N_Attribute_Reference and then Present (Expressions (Expr)))) and then Requires_Transient_Scope (Etype (Expr)) |