aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Bosch <bosch@gcc.gnu.org>2001-12-11 22:49:34 +0100
committerGeert Bosch <bosch@gcc.gnu.org>2001-12-11 22:49:34 +0100
commit290986ede68c7fb27f1ec54c63aa7c2398601444 (patch)
tree8cc7939c95106e6f70eed7984957142b676ad999
parent84157f5101464652f4bdf73291f1f824935c7ef8 (diff)
downloadgcc-290986ede68c7fb27f1ec54c63aa7c2398601444.zip
gcc-290986ede68c7fb27f1ec54c63aa7c2398601444.tar.gz
gcc-290986ede68c7fb27f1ec54c63aa7c2398601444.tar.bz2
gnatcmd.adb: Changed /COMPILE_ONLY to /ACTIONS=COMPILE Changed /BIND_ONLY to /ACTIONS=BIND...
* gnatcmd.adb: Changed /COMPILE_ONLY to /ACTIONS=COMPILE Changed /BIND_ONLY to /ACTIONS=BIND Changed /LINK_ONLY to /ACTIONS=LINK * sem_ch8.adb (Find_Selected_Component): improved search for a candidate package in case of error. * sem_ch12.adb (Inline_Instance_Body): place head of use_clause chain back on scope stack before reinstalling use clauses. * exp_ch5.adb (Expand_N_If_Statement): if Constant_Condition_Warnings is enabled, do not kill the code for the condition, to preserve warning. From-SVN: r47895
-rw-r--r--gcc/ada/ChangeLog19
-rw-r--r--gcc/ada/exp_ch5.adb7
-rw-r--r--gcc/ada/gnatcmd.adb21
-rw-r--r--gcc/ada/sem_ch12.adb2
-rw-r--r--gcc/ada/sem_ch8.adb7
5 files changed, 40 insertions, 16 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 9a1631b..5a24178 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,22 @@
+2001-12-11 Vincent Celier <celier@gnat.com>
+
+ * gnatcmd.adb:
+ Changed /COMPILE_ONLY to /ACTIONS=COMPILE
+ Changed /BIND_ONLY to /ACTIONS=BIND
+ Changed /LINK_ONLY to /ACTIONS=LINK
+
+2001-12-11 Ed Schonberg <schonber@gnat.com>
+
+ * sem_ch8.adb (Find_Selected_Component): improved search for a
+ candidate package in case of error.
+
+ * sem_ch12.adb (Inline_Instance_Body): place head of use_clause
+ chain back on scope stack before reinstalling use clauses.
+
+ * exp_ch5.adb (Expand_N_If_Statement): if Constant_Condition_Warnings
+ is enabled, do not kill the code for the condition, to preserve
+ warning.
+
2001-12-11 Robert Dewar <dewar@gnat.com>
* checks.adb (Insert_Valid_Check): Apply validity check to expression
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index 8c56fe3..b6b23d0 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.216 $
+-- $Revision$
-- --
-- Copyright (C) 1992-2001, Free Software Foundation, Inc. --
-- --
@@ -1895,7 +1895,10 @@ package body Exp_Ch5 is
-- the Then statements
else
- Kill_Dead_Code (Condition (N));
+ if not Constant_Condition_Warnings then
+ Kill_Dead_Code (Condition (N));
+ end if;
+
Kill_Dead_Code (Then_Statements (N));
-- If there are no elsif statements, then we simply replace
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index 127c304..bf98c69 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -1011,18 +1011,20 @@ procedure GNATCmd is
-- Switches for GNAT MAKE --
----------------------------
+ S_Make_Actions : aliased constant S := "/ACTIONS=" &
+ "COMPILE " &
+ "-c " &
+ "BIND " &
+ "-b " &
+ "LINK " &
+ "-l ";
+
S_Make_All : aliased constant S := "/ALL_FILES " &
"-a";
- S_Make_Bind_Only : aliased constant S := "/BIND_ONLY " &
- "-b";
-
S_Make_Bind : aliased constant S := "/BINDER_QUALIFIERS=?" &
"-bargs BIND";
- S_Make_Compile_Only : aliased constant S := "/COMPILE_ONLY " &
- "-c";
-
S_Make_Comp : aliased constant S := "/COMPILER_QUALIFIERS=?" &
"-cargs COMPILE";
@@ -1056,9 +1058,6 @@ procedure GNATCmd is
S_Make_Link : aliased constant S := "/LINKER_QUALIFIERS=?" &
"-largs LINK";
- S_Make_Link_Only : aliased constant S := "/LINK_ONLY " &
- "-l";
-
S_Make_Minimal : aliased constant S := "/MINIMAL_RECOMPILATION " &
"-m";
@@ -1099,11 +1098,10 @@ procedure GNATCmd is
"-v";
Make_Switches : aliased constant Switches := (
+ S_Make_Actions 'Access,
S_Make_All 'Access,
S_Make_Bind 'Access,
- S_Make_Bind_Only'Access,
S_Make_Comp 'Access,
- S_Make_Compile_Only'Access,
S_Make_Cond 'Access,
S_Make_Cont 'Access,
S_Make_Current 'Access,
@@ -1115,7 +1113,6 @@ procedure GNATCmd is
S_Make_Inplace 'Access,
S_Make_Library 'Access,
S_Make_Link 'Access,
- S_Make_Link_Only'Access,
S_Make_Minimal 'Access,
S_Make_Nolink 'Access,
S_Make_Nostinc 'Access,
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 55adc75..2f821b1 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -2812,6 +2812,8 @@ package body Sem_Ch12 is
end if;
for J in reverse 1 .. Num_Scopes loop
+ Scope_Stack.Table (Scope_Stack.Last - J + 1).First_Use_Clause :=
+ Use_Clauses (J);
Install_Use_Clauses (Use_Clauses (J));
end loop;
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 3947eb8..7e24ef6 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -3687,9 +3687,12 @@ package body Sem_Ch8 is
then
-- Prefix may mention a package that is hidden by a local
- -- declaration: let the user know.
+ -- declaration: let the user know. Scan the full homonym
+ -- chain, the candidate package may be anywhere on it.
- if Present (Homonym (P_Name)) then
+ if Present (Homonym (Current_Entity (P_Name))) then
+
+ P_Name := Current_Entity (P_Name);
while Present (P_Name) loop
exit when Ekind (P_Name) = E_Package;