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] Improved runtime exception message for duplicated external tag


This change improves the exception message associated with PROGRAM_ERROR
for duplicated external tag by including the value of the offending
external tag.

The following compilation must raise Program_Error with the indicated
exception message:

$ gnatmake -z dup_ext_tag.ads
$ ./dup_ext_tag 

raised PROGRAM_ERROR : duplicated external tag foo

pragma Ada_2005;
package Dup_Ext_Tag is
   type T1 is tagged null record; for T1'External_Tag use "foo";
   type T2 is tagged null record; for T2'External_Tag use "foo";
end Dup_Ext_Tag;

Tested on x86_64-pc-linux-gnu, committed on trunk

2011-08-04  Thomas Quinot  <quinot@adacore.com>

	* a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
	external tag, include the value of the external tag in the exception
	message.

Attachment: difs
Description: Text document


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