diff mbox

[Ada] Don't allow REASON parameter for pragma Warnings in compiler unit

Message ID 20130910151524.GA25754@adacore.com
State New
Headers show

Commit Message

Arnaud Charlet Sept. 10, 2013, 3:15 p.m. UTC
This patch forbids the use of the pragma Warnings REASON parameter in
compiler units (since this would cause bootstrap issues). This is for
internal development purposes only. No functionality change.

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

2013-09-10  Robert Dewar  <dewar@adacore.com>

	* sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow
	REASON parameter in compiler units (bootstrap issues).
diff mbox

Patch

Index: sem_prag.adb
===================================================================
--- sem_prag.adb	(revision 202462)
+++ sem_prag.adb	(working copy)
@@ -17958,6 +17958,10 @@ 
                then
                   Check_Arg_Is_Static_Expression (Last_Arg, Standard_String);
                   Arg_Count := Arg_Count - 1;
+
+                  --  Not allowed in compiler units (bootstrap issues)
+
+                  Check_Compiler_Unit (N);
                end if;
             end;