diff mbox

[Ada] Fix GNAT compilation error when SPARK restriction mode is set

Message ID 20110804152806.GA3723@adacore.com
State New
Headers show

Commit Message

Arnaud Charlet Aug. 4, 2011, 3:28 p.m. UTC
GNAT compilation error when SPARK restriction mode was set with attribut reference violation is now correct.

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

2011-08-04  Marc Sango  <sango@adacore.com>

	* sem_attr.adb (Analyze_Attribute): Replace the message
	"invisible attribute of}" of the spark restriction violation in
	attribute reference by the simple message "invisible attribute of type".
	Indeed, the node value Error_Msg_Node_1 used is in conflit with the
	two insertion characters: '&' and '}'.
diff mbox

Patch

Index: sem_attr.adb
===================================================================
--- sem_attr.adb	(revision 177384)
+++ sem_attr.adb	(working copy)
@@ -2068,8 +2068,7 @@ 
         and then not In_Open_Scopes (Scope (P_Type))
         and then not In_Spec_Expression
       then
-         Error_Msg_Node_1 := First_Subtype (P_Type);
-         Check_SPARK_Restriction ("invisible attribute of}", N);
+         Check_SPARK_Restriction ("invisible attribute of type", N);
       end if;
 
       --  Remaining processing depends on attribute