aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/sem_warn.adb6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 5d76246..7d9a411 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-04 Ed Schonberg <schonber@gnat.com>
+
+ * sem_warn.adb (Output_Unreferenced_Messages): Extend previous fix to
+ constants.
+
2001-12-04 Robert Dewar <dewar@gnat.com>
* errout.adb: Minor reformatting
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index f3133d2..b31aff7 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.24 $
+-- $Revision$
-- --
-- Copyright (C) 1999-2001 Free Software Foundation, Inc. --
-- --
@@ -926,7 +926,9 @@ package body Sem_Warn is
end if;
when E_Constant =>
- if Present (Renamed_Object (E)) then
+ if Present (Renamed_Object (E))
+ and then Comes_From_Source (Renamed_Object (E))
+ then
Error_Msg_N ("renamed constant & is not referenced?", E);
else
Error_Msg_N ("constant & is not referenced?", E);