This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]