From 7394c8cca8c820f6b84a3fb57dc9d3e798b6fb7f Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 2 Aug 2011 11:24:25 +0200 Subject: [PATCH] Minor reformatting. From-SVN: r177105 --- gcc/ada/sem_ch6.adb | 13 +++++-------- gcc/ada/sem_ch8.adb | 7 +++---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 260edc2faa2..140113cbf44 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -1392,7 +1392,6 @@ package body Sem_Ch6 is if Result_Definition (N) /= Error then if Nkind (Result_Definition (N)) = N_Access_Definition then - Check_Formal_Restriction ("access result is not allowed", Result_Definition (N)); @@ -1431,7 +1430,7 @@ package body Sem_Ch6 is then Check_Formal_Restriction ("returning an unconstrained array is not allowed", - Result_Definition (N)); + Result_Definition (N)); end if; -- Ada 2005 (AI-231): Ensure proper usage of null exclusion @@ -1861,16 +1860,15 @@ package body Sem_Ch6 is -- Special checks in formal mode if Nkind (Body_Spec) = N_Function_Specification then - -- In formal mode, the last statement of a function should be a - -- return statement. + + -- In formal mode, last statement of a function should be a return declare Stat : constant Node_Id := Last_Source_Statement (HSS); begin if Present (Stat) - and then not Nkind_In (Stat, - N_Simple_Return_Statement, - N_Extended_Return_Statement) + and then not Nkind_In (Stat, N_Simple_Return_Statement, + N_Extended_Return_Statement) then Check_Formal_Restriction ("last statement in function should be RETURN", Stat); @@ -8769,7 +8767,6 @@ package body Sem_Ch6 is Default := Expression (Param_Spec); if Present (Default) then - Check_Formal_Restriction ("default expression is not allowed", Default); diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index de3b9ff3ec7..7c9f59be887 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -2553,10 +2553,9 @@ package body Sem_Ch8 is Set_Hidden_By_Use_Clause (N, No_Elist); - -- Use clause is not allowed in a spec of a predefined package - -- declaration except that packages whose file name starts a-n are OK - -- (these are children of Ada.Numerics, and such packages are never - -- loaded by Rtsfind). + -- Use clause not allowed in a spec of a predefined package declaration + -- except that packages whose file name starts a-n are OK (these are + -- children of Ada.Numerics, which are never loaded by Rtsfind). if Is_Predefined_File_Name (Unit_File_Name (Current_Sem_Unit)) and then Name_Buffer (1 .. 3) /= "a-n" -- 2.30.2