diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2017-01-20 11:51:36 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-01-20 12:51:36 +0100 |
commit | 7124d1a50ed62e7ef6703d01d8fd122a50e27ccc (patch) | |
tree | 9801adee0ba6ac4e680f5d2be8835104c2a397aa | |
parent | 89a53f83d8494256c90b0658be00bc9cff38bf3b (diff) | |
download | gcc-7124d1a50ed62e7ef6703d01d8fd122a50e27ccc.zip gcc-7124d1a50ed62e7ef6703d01d8fd122a50e27ccc.tar.gz gcc-7124d1a50ed62e7ef6703d01d8fd122a50e27ccc.tar.bz2 |
sem_ch10.adb, [...]: Minor reformatting.
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch10.adb, sem_cat.adb: Minor reformatting.
From-SVN: r244703
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/sem_cat.adb | 31 | ||||
-rw-r--r-- | gcc/ada/sem_ch10.adb | 8 |
3 files changed, 26 insertions, 17 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 03f1e98..07c08e9 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2017-01-20 Hristian Kirtchev <kirtchev@adacore.com> + + * sem_ch10.adb, sem_cat.adb: Minor reformatting. + 2017-01-20 Javier Miranda <miranda@adacore.com> * sem_ch3.adb (Access_Type_Declaration): Protect access to the diff --git a/gcc/ada/sem_cat.adb b/gcc/ada/sem_cat.adb index fbe5382..878cab0 100644 --- a/gcc/ada/sem_cat.adb +++ b/gcc/ada/sem_cat.adb @@ -1015,20 +1015,23 @@ package body Sem_Cat is Item := First (Context_Items (P)); while Present (Item) loop if Nkind (Item) = N_With_Clause - and then not (Implicit_With (Item) - or else Limited_Present (Item) - - -- Skip if error already posted on the WITH - -- clause (in which case the Name attribute - -- may be invalid). In particular, this fixes - -- the problem of hanging in the presence of a - -- WITH clause on a child that is an illegal - -- generic instantiation. - - or else Error_Posted (Item)) - and then not (Try_Semantics - -- Skip processing malformed trees - and then Nkind (Name (Item)) not in N_Has_Entity) + and then + not (Implicit_With (Item) + or else Limited_Present (Item) + + -- Skip if error already posted on the WITH clause (in + -- which case the Name attribute may be invalid). In + -- particular, this fixes the problem of hanging in the + -- presence of a WITH clause on a child that is an + -- illegal generic instantiation. + + or else Error_Posted (Item)) + and then + not (Try_Semantics + + -- Skip processing malformed trees + + and then Nkind (Name (Item)) not in N_Has_Entity) then Entity_Of_Withed := Entity (Name (Item)); Check_Categorization_Dependencies diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index 180c025..5ea2baf 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -4202,16 +4202,18 @@ package body Sem_Ch10 is -- Do not install private_with_clauses declaration, unless unit -- is itself a private child unit, or is a body. Note that for a - -- subprogram body the private_with_clause does not take effect until - -- after the specification. + -- subprogram body the private_with_clause does not take effect + -- until after the specification. if Nkind (Item) /= N_With_Clause or else Implicit_With (Item) or else Limited_Present (Item) or else Error_Posted (Item) + -- Skip processing malformed trees + or else (Try_Semantics - and then Nkind (Name (Item)) not in N_Has_Entity) + and then Nkind (Name (Item)) not in N_Has_Entity) then null; |