From 4c7e09908b732b93b74b49ad3eafda0198c1d1df Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 6 Feb 2013 11:10:32 +0100 Subject: [multiple changes] 2013-02-06 Hristian Kirtchev * exp_ch4.adb (Expand_N_Expression_With_Actions): Rewritten. This routine should be able to properly detect controlled transient objects in its actions and generate the appropriate finalization actions. * exp_ch6.adb (Enclosing_Context): Removed. (Expand_Ctrl_Function_Call): Remove local subprogram and constant. Use routine Within_Case_Or_If_Expression to determine whether the lifetime of the function result must be extended to match that of the context. * exp_util.ads, exp_util.adb (Within_Case_Or_If_Expression): New routine. 2013-02-06 Ed Schonberg * sem_ch12.adb (Validate_Array_Type_Instance): Extend check for subtype matching of component type of formal array type, to avoid spurious error when component type is a separate actual in the instance, and there may be a discrepancy between private and full view of component type. From-SVN: r195790 --- gcc/ada/exp_util.ads | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/ada/exp_util.ads') diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads index 339fd43..e0b0e09 100644 --- a/gcc/ada/exp_util.ads +++ b/gcc/ada/exp_util.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -818,6 +818,9 @@ package Exp_Util is -- is conservative, in that a result of False is decisive. A result of True -- means that such a component may or may not be present. + function Within_Case_Or_If_Expression (N : Node_Id) return Boolean; + -- Determine whether arbitrary node N is within a case or an if expression + procedure Wrap_Cleanup_Procedure (N : Node_Id); -- Given an N_Subprogram_Body node, this procedure adds an Abort_Defer call -- at the start of the statement sequence, and an Abort_Undefer call at the -- cgit v1.1