From b6dc26ba9b701d2f3f5b72fe51e97f428bab3e7a Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 28 Apr 2017 15:38:19 +0200 Subject: [PATCH] Minor reformatting. From-SVN: r247388 --- gcc/ada/sem_ch6.adb | 9 +++++---- gcc/ada/sem_res.adb | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index a4fd1f4..17fd71d 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -3111,10 +3111,11 @@ package body Sem_Ch6 is end; end if; - -- Freezing an access type does not freeze the designated - -- type, but freezing conversions between access to interfaces - -- requires that the interface types themselves be frozen, so - -- that dispatch table entities are properly created. + -- Freezing an access type does not freeze the designated type, + -- but freezing conversions between access to interfaces requires + -- that the interface types themselves be frozen, so that dispatch + -- table entities are properly created. + -- Unclear whether a more general rule is needed ??? elsif Nkind (Node) = N_Type_Conversion diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 97f6cb6..ba28eda 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -11945,6 +11945,7 @@ package body Sem_Res is function In_Instance_Code return Boolean is Par : Node_Id; + begin if not In_Instance then return False; @@ -11953,24 +11954,25 @@ package body Sem_Res is Par := Parent (N); while Present (Par) loop - -- The expression is part of an actual object if it appears - -- in the generated object declaration in the instance. + -- The expression is part of an actual object if it appears in + -- the generated object declaration in the instance. if Nkind (Par) = N_Object_Declaration - and then Present (Corresponding_Generic_Association (Par)) + and then Present (Corresponding_Generic_Association (Par)) then return False; + else - exit when Nkind (Par) - in N_Statement_Other_Than_Procedure_Call - or else Nkind (Par) in N_Subprogram_Call - or else Nkind (Par) in N_Declaration; + exit when + Nkind (Par) in N_Statement_Other_Than_Procedure_Call + or else Nkind (Par) in N_Subprogram_Call + or else Nkind (Par) in N_Declaration; end if; Par := Parent (Par); end loop; - -- Otherwise the expression appears within the instantiated unit. + -- Otherwise the expression appears within the instantiated unit return True; end if; -- 2.7.4