diff options
Diffstat (limited to 'gcc/ada/sem_ch10.adb')
-rw-r--r-- | gcc/ada/sem_ch10.adb | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index 80a729f..5976b4d 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -946,16 +946,14 @@ package body Sem_Ch10 is -- Treat compilation unit pragmas that appear after the library unit - if Present (Pragmas_After (Aux_Decls_Node (N))) then - declare - Prag_Node : Node_Id := First (Pragmas_After (Aux_Decls_Node (N))); - begin - while Present (Prag_Node) loop - Analyze (Prag_Node); - Next (Prag_Node); - end loop; - end; - end if; + declare + Prag_Node : Node_Id := First (Pragmas_After (Aux_Decls_Node (N))); + begin + while Present (Prag_Node) loop + Analyze (Prag_Node); + Next (Prag_Node); + end loop; + end; -- Analyze the contract of a [generic] subprogram that acts as a -- compilation unit after all compilation pragmas have been analyzed. @@ -3353,19 +3351,17 @@ package body Sem_Ch10 is -- Start of processing for Has_With_Clause begin - if Present (Context_Items (C_Unit)) then - Item := First (Context_Items (C_Unit)); - while Present (Item) loop - if Nkind (Item) = N_With_Clause - and then Limited_Present (Item) = Is_Limited - and then Named_Unit (Item) = Pack - then - return True; - end if; + Item := First (Context_Items (C_Unit)); + while Present (Item) loop + if Nkind (Item) = N_With_Clause + and then Limited_Present (Item) = Is_Limited + and then Named_Unit (Item) = Pack + then + return True; + end if; - Next (Item); - end loop; - end if; + Next (Item); + end loop; return False; end Has_With_Clause; |