diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2019-07-11 08:03:28 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-07-11 08:03:28 +0000 |
commit | 929d520369a92d26bb734d79588ffde8aba6e8e8 (patch) | |
tree | d1f8f4d6ab730798815921e4d5bee64c44c5dd6f | |
parent | 8b727104817f1b0c2a03013ed397e99f8673405c (diff) | |
download | gcc-929d520369a92d26bb734d79588ffde8aba6e8e8.zip gcc-929d520369a92d26bb734d79588ffde8aba6e8e8.tar.gz gcc-929d520369a92d26bb734d79588ffde8aba6e8e8.tar.bz2 |
[Ada] Minor refactoring
2019-07-11 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* checks.adb: Fix typo in comment.
* sem.adb (Semantics): Avoid repeated calls to
In_Extended_Main_Source_Unit by reusing an already-cached
result.
* sem_util.adb (First_Global): Fix style.
From-SVN: r273406
-rw-r--r-- | gcc/ada/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/checks.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 2 |
4 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 59f20c4..e3fd0a1 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2019-07-11 Piotr Trojanek <trojanek@adacore.com> + + * checks.adb: Fix typo in comment. + * sem.adb (Semantics): Avoid repeated calls to + In_Extended_Main_Source_Unit by reusing an already-cached + result. + * sem_util.adb (First_Global): Fix style. + 2019-07-11 Yannick Moy <moy@adacore.com> * sem_res.adb (Resolve_Call): Do not perform dimensionality diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 984bb15..73f7edc 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -7056,7 +7056,7 @@ package body Checks is Convert_And_Check_Range; end if; - -- Note that at this stage we now that the Target_Base_Type is not in + -- Note that at this stage we know that the Target_Base_Type is not in -- the range of the Source_Base_Type (since even the Target_Type itself -- is not in this range). It could still be the case that Source_Type is -- in range of the target base type since we have not checked that case. diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb index fa3ed48..2f8f6a4 100644 --- a/gcc/ada/sem.adb +++ b/gcc/ada/sem.adb @@ -1579,7 +1579,7 @@ package body Sem is and then Nkind (Unit (Comp_Unit)) in N_Proper_Body and then (Nkind (Unit (Comp_Unit)) /= N_Subprogram_Body or else not Acts_As_Spec (Comp_Unit)) - and then not In_Extended_Main_Source_Unit (Comp_Unit) + and then not Ext_Main_Source_Unit then null; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 04d981a6..f18eb0f 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -8703,6 +8703,8 @@ package body Sem_Util is Global : Node_Id := Empty; Body_Id : Entity_Id; + -- Start of processing for First_Global + begin pragma Assert (Nam_In (Global_Mode, Name_In_Out, Name_Input, |