summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_warn.adb
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-05 01:18:06 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-05 01:18:06 +0000
commit6afd31fc8be8eaa84bb98e35f2bc57d82b34e1e0 (patch)
tree70ce33fb6242a5b6ffce5b277825ff933d0a2313 /gcc/ada/sem_warn.adb
parent71aa0fe50335672fa8141808c9bcd63031acab81 (diff)
downloadgcc-6afd31fc8be8eaa84bb98e35f2bc57d82b34e1e0.tar.gz
* sem_warn.adb (Output_Unreferenced_Messages): Extend previous fix to
constants. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47641 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_warn.adb')
-rw-r--r--gcc/ada/sem_warn.adb6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index f3133d2006d..b31aff7f437 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);