2011-08-03 Emmanuel Briot <briot@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Aug 2011 09:27:50 +0000 (09:27 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Aug 2011 09:27:50 +0000 (09:27 +0000)
* prj-tree.ads: Remove unused variable.

2011-08-03  Yannick Moy  <moy@adacore.com>

* restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
issuing messages related to SPARK restriction violation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177246 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/prj-tree.ads
gcc/ada/restrict.adb

index 9fb4ce8..111f819 100644 (file)
@@ -1,3 +1,12 @@
+2011-08-03  Emmanuel Briot  <briot@adacore.com>
+
+       * prj-tree.ads: Remove unused variable.
+
+2011-08-03  Yannick Moy  <moy@adacore.com>
+
+       * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
+       issuing messages related to SPARK restriction violation.
+
 2011-08-03  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_ch6.adb: guard against error nodes in return statements.
index f24c406..5bb123f 100644 (file)
@@ -1464,10 +1464,6 @@ package Prj.Tree is
       --  project-tree specific so that one can load the same tree twice but
       --  have two views of it, for instance.
 
-      Target_Name : String_Access := null;
-      --  The target name, if any, specified with the gprbuild or gprclean
-      --  switch --target=.
-
       Project_Path : aliased Prj.Env.Project_Search_Path;
       --  The project path is tree specific, since we might want to load
       --  simultaneously multiple projects, each with its own search path, in
index fdc243c..44e3b5f 100644 (file)
@@ -715,9 +715,10 @@ package body Restrict is
 
       procedure Id_Case (S : String; Quotes : Boolean := True);
       --  Given a string S, case it according to current identifier casing,
-      --  and store in Error_Msg_String. Then append `~` to the message buffer
-      --  to output the string unchanged surrounded in quotes. The quotes are
-      --  suppressed if Quotes = False.
+      --  except for SPARK (an acronym) which is set all upper case, and store
+      --  in Error_Msg_String. Then append `~` to the message buffer to output
+      --  the string unchanged surrounded in quotes. The quotes are suppressed
+      --  if Quotes = False.
 
       --------------
       -- Add_Char --
@@ -747,7 +748,13 @@ package body Restrict is
       begin
          Name_Buffer (1 .. S'Last) := S;
          Name_Len := S'Length;
-         Set_Casing (Identifier_Casing (Get_Source_File_Index (Sloc (N))));
+
+         if R = SPARK then
+            Set_All_Upper_Case;
+         else
+            Set_Casing (Identifier_Casing (Get_Source_File_Index (Sloc (N))));
+         end if;
+
          Error_Msg_Strlen := Name_Len;
          Error_Msg_String (1 .. Name_Len) := Name_Buffer (1 .. Name_Len);