From 643827e99051c3ce6077d8bb332290741dc90571 Mon Sep 17 00:00:00 2001 From: Steve Baird Date: Wed, 6 Sep 2017 12:01:13 +0000 Subject: exp_util.adb (Side_Effect_Free): For CodePeer (only) treat uses of 'Image and related attributes as having side... 2017-09-06 Steve Baird * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat uses of 'Image and related attributes as having side effects in order to avoid replicating such uses. * pprint.ads (Expression_Image) Add new generic formal flag Hide_Temp_Derefs. The flag defaults to False; CodePeer will (eventually) override the default. * pprint.adb (Expression_Image) If the new flag is set, then suppress the ".all" suffix when displaying a dereference whose prefix is a use of a value-capturing compiler temp of the sort generated by Expr_Util.Remove_Side_Effects . * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb, sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb: Minor reformatting. * inline.adb: Minor wording change. From-SVN: r251784 --- gcc/ada/inline.adb | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'gcc/ada/inline.adb') diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 15efcef..70d1f848 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -1607,7 +1607,6 @@ package body Inline is -------------------------- procedure Build_Body_To_Inline (N : Node_Id; Spec_Id : Entity_Id) is - procedure Generate_Subprogram_Body (N : Node_Id; Body_To_Inline : out Node_Id); @@ -1683,11 +1682,10 @@ package body Inline is Save_Env (Scope (Current_Scope), Scope (Current_Scope)); end if; - -- We need to capture references to the formals in order - -- to substitute the actuals at the point of inlining, i.e. - -- instantiation. To treat the formals as globals to the body to - -- inline, we nest it within a dummy parameterless subprogram, - -- declared within the real one. + -- Capture references to formals in order to substitute the actuals + -- at the point of inlining or instantiation. To treat the formals + -- as globals to the body to inline, nest the body within a dummy + -- parameterless subprogram, declared within the real one. Generate_Subprogram_Body (N, Original_Body); Body_To_Analyze := Copy_Generic_Node (Original_Body, Empty, False); @@ -1730,8 +1728,7 @@ package body Inline is -- Can_Split_Unconstrained_Function -- -------------------------------------- - function Can_Split_Unconstrained_Function (N : Node_Id) return Boolean - is + function Can_Split_Unconstrained_Function (N : Node_Id) return Boolean is Ret_Node : constant Node_Id := First (Statements (Handled_Statement_Sequence (N))); D : Node_Id; @@ -2925,7 +2922,7 @@ package body Inline is -- The semantic analyzer checked that frontend-inlined functions -- returning unconstrained types have no declarations and have -- a single extended return statement. As part of its processing - -- the function was split in two subprograms: a procedure P' and + -- the function was split into two subprograms: a procedure P' and -- a function F' that has a block with a call to procedure P' (see -- Split_Unconstrained_Function). -- cgit v1.1