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] Add Reason argument to pragma Warnings


All forms of the pragma Warnings now allow an optional extra argument
(Reason => static_string_EXPRESSION) that is intended for documenting
the purpose of a Warnings pragma. The compiler checks that the argument
is a static string expression, but otherwise ignores it. The string is
left in the tree, so other tools (e.g. ASIS) tools can read the reason
string and possibly provide specialized processing for it.

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

2013-04-25  Robert Dewar  <dewar@adacore.com>

	* gnat_rm.texi: Document Reason argument for pragma Warnings.
	* par-prag.adb: Handle Reason parameter for pragma Warnings.
	* sem_prag.adb (Analyze_Pragma, case Warnings): Allow Reason argument.
	* snames.ads-tmpl (Name_Reason): New name entry.

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]