aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-02 11:24:25 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-02 11:24:25 +0200
commit7394c8cca8c820f6b84a3fb57dc9d3e798b6fb7f (patch)
treece33ba49598906e7d56b66357c61b07f1be3ed1b
parent277c9abedd9f5e075d0df64d7a887a1f825beb1f (diff)
downloadgcc-7394c8cca8c820f6b84a3fb57dc9d3e798b6fb7f.zip
gcc-7394c8cca8c820f6b84a3fb57dc9d3e798b6fb7f.tar.gz
gcc-7394c8cca8c820f6b84a3fb57dc9d3e798b6fb7f.tar.bz2
Minor reformatting.
From-SVN: r177105
-rw-r--r--gcc/ada/sem_ch6.adb13
-rw-r--r--gcc/ada/sem_ch8.adb7
2 files changed, 8 insertions, 12 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 260edc2..140113c 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 de3b9ff..7c9f59b 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"