aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/restrict.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 11:27:50 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 11:27:50 +0200
commitc565bc662885e6499424f898701924445d62c2f7 (patch)
treea033cb6d6b89984285bb89bb722e3dd9d276fca4 /gcc/ada/restrict.adb
parent4ee646da946cc32932a71e3675898043d2e905c0 (diff)
downloadgcc-c565bc662885e6499424f898701924445d62c2f7.zip
gcc-c565bc662885e6499424f898701924445d62c2f7.tar.gz
gcc-c565bc662885e6499424f898701924445d62c2f7.tar.bz2
[multiple changes]
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. From-SVN: r177246
Diffstat (limited to 'gcc/ada/restrict.adb')
-rw-r--r--gcc/ada/restrict.adb15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ada/restrict.adb b/gcc/ada/restrict.adb
index fdc243c..44e3b5f 100644
--- a/gcc/ada/restrict.adb
+++ b/gcc/ada/restrict.adb
@@ -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);