This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Improve warning message for unreferenced constants
- From: Geert Bosch <bosch at darwin dot gnat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 4 Dec 2001 20:18:26 -0500 (EST)
- Subject: [Ada] Improve warning message for unreferenced constants
2001-12-04 Ed Schonberg <schonber@gnat.com>
* sem_warn.adb (Output_Unreferenced_Messages): Extend previous fix to
constants.
*** sem_warn.adb 2001/09/07 16:41:40 1.24
--- sem_warn.adb 2001/10/13 18:45:30 1.25
***************
*** 926,932 ****
end if;
when E_Constant =>
! if Present (Renamed_Object (E)) then
Error_Msg_N ("renamed constant & is not referenced?", E);
else
Error_Msg_N ("constant & is not referenced?", E);
--- 926,934 ----
end if;
when E_Constant =>
! 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);