From patchwork Tue Aug 10 13:51:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Ada] Clean up -gnat2012 messages From: Arnaud Charlet X-Patchwork-Id: 61383 Message-Id: <20100810135116.GA10165@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Robert Dewar Date: Tue, 10 Aug 2010 15:51:16 +0200 This is a minor format change for messages about using the -gnat2012 switch. No significant functional effect. No test needed. Tested on x86_64-pc-linux-gnu, committed on trunk 2010-08-10 Robert Dewar * errout.ads: Add VMS table entries for 2005, 12, 2012 switches * par-ch4.adb: Change wording of Ada 2012 messages * vms_data.ads: Add VMS entries for /2005, /12, /2012 Index: par-ch4.adb =================================================================== --- par-ch4.adb (revision 163054) +++ par-ch4.adb (working copy) @@ -2670,7 +2670,7 @@ package body Ch4 is begin if Ada_Version < Ada_12 then Error_Msg_SC ("|case expression is an Ada 2012 feature"); - Error_Msg_SC ("\|use -gnat12 switch to compile this unit"); + Error_Msg_SC ("\|unit must be compiled with -gnat2012 switch"); end if; Scan; -- past CASE @@ -2761,7 +2761,7 @@ package body Ch4 is if Token = Tok_If and then Ada_Version < Ada_12 then Error_Msg_SC ("|conditional expression is an Ada 2012 feature"); - Error_Msg_SC ("\|use -gnat12 switch to compile this unit"); + Error_Msg_SC ("\|unit must be compiled with -gnat2012 switch"); end if; Scan; -- past IF or ELSIF @@ -2844,7 +2844,7 @@ package body Ch4 is if Token = Tok_Vertical_Bar then if Ada_Version < Ada_12 then Error_Msg_SC ("set notation is an Ada 2012 feature"); - Error_Msg_SC ("\|use -gnat12 switch to compile this unit"); + Error_Msg_SC ("\|unit must be compiled with -gnat2012 switch"); end if; Set_Alternatives (N, New_List (Alt)); Index: errout.ads =================================================================== --- errout.ads (revision 163054) +++ errout.ads (working copy) @@ -376,8 +376,14 @@ package Errout is Gname5 : aliased constant String := "gnat05"; Vname5 : aliased constant String := "05"; - Gname6 : aliased constant String := "gnat12"; - Vname6 : aliased constant String := "12"; + Gname6 : aliased constant String := "gnat2005"; + Vname6 : aliased constant String := "2005"; + + Gname7 : aliased constant String := "gnat12"; + Vname7 : aliased constant String := "12"; + + Gname8 : aliased constant String := "gnat2012"; + Vname8 : aliased constant String := "2012"; type Cstring_Ptr is access constant String; @@ -387,7 +393,9 @@ package Errout is Gname3'Access, Gname4'Access, Gname5'Access, - Gname6'Access); + Gname6'Access, + Gname7'Access, + Gname8'Access); Vnames : array (Nat range <>) of Cstring_Ptr := (Vname1'Access, @@ -395,7 +403,9 @@ package Errout is Vname3'Access, Vname4'Access, Vname5'Access, - Vname6'Access); + Vname6'Access, + Vname7'Access, + Vname8'Access); ----------------------------------------------------- -- Global Values Used for Error Message Insertions -- Index: vms_data.ads =================================================================== --- vms_data.ads (revision 163054) +++ vms_data.ads (working copy) @@ -1229,6 +1229,13 @@ package VMS_Data is -- -- Allows GNAT to recognize the full range of Ada 2005 constructs. + S_GCC_Ada_2005 : aliased constant S := "/2005 " & + "-gnat2005"; + -- /05 (D) + -- + -- Allows GNAT to recognize the full range of Ada 2005 constructs. + -- Equivalent to /05 (/2005 is the preferred usage). + S_GCC_Ada_12 : aliased constant S := "/12 " & "-gnat12"; -- /05 (D) @@ -1236,6 +1243,14 @@ package VMS_Data is -- Allows GNAT to recognize all implemented proposed Ada 2012 -- extensions. See features file for list of implemented features. + S_GCC_Ada_2012 : aliased constant S := "/2012 " & + "-gnat2012"; + -- /05 (D) + -- + -- Allows GNAT to recognize all implemented proposed Ada 2012 + -- extensions. See features file for list of implemented features. + -- Equivalent to /12 (/2012 is the preferred usage). + S_GCC_Add : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*" & "-aP*"; -- /ADD_PROJECT_SEARCH_PATH=(directory[,...]) @@ -3443,6 +3458,9 @@ package VMS_Data is (S_GCC_Ada_83 'Access, S_GCC_Ada_95 'Access, S_GCC_Ada_05 'Access, + S_GCC_Ada_2005'Access, + S_GCC_Ada_12 'Access, + S_GCC_Ada_2012'Access, S_GCC_Add 'Access, S_GCC_Asm 'Access, S_GCC_AValid 'Access,