diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-29 10:29:09 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-29 10:29:09 +0000 |
commit | 9b2fa50387730ce33a9541f77ed47f2974680d5d (patch) | |
tree | f9f1bcd3de6f91002e0d807025cfaffe86679552 /gcc/ada/scn.adb | |
parent | 89cc7147fbacb5e850051c7996fe510d4379253d (diff) | |
download | gcc-9b2fa50387730ce33a9541f77ed47f2974680d5d.tar.gz |
2011-08-29 Robert Dewar <dewar@adacore.com>
* sem_ch8.adb: Minor reformatting.
2011-08-29 Bob Duff <duff@adacore.com>
* par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
* par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
treating "some" as unreserved in earlier Ada versions. This is now
handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
rather than Name_Some, since Tok_Some is now recognized as reserved.
* scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
reserved word.
* scans.ads: Minor comment fixes.
* snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
for other language versions.
* scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
treating "some" as unreserved in earlier Ada versions. This is now
handled in Snames.Is_Keyword_Name.
* par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
Ada 2012.
(P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
unreserved in earlier Ada versions. This is now handled in
Snames.Is_Keyword_Name.
* snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
words as for other language versions.
* gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
Ada 2012, not just Ada 2005.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178191 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/scn.adb')
-rw-r--r-- | gcc/ada/scn.adb | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/gcc/ada/scn.adb b/gcc/ada/scn.adb index 2862a0afa08..ed6b1a87beb 100644 --- a/gcc/ada/scn.adb +++ b/gcc/ada/scn.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -472,18 +472,9 @@ package body Scn is Token_Name := Name_Find; if not Used_As_Identifier (Token) or else Force_Msg then - - -- If "some" is made into a reserved work in Ada2012, the following - -- check will make it into a regular identifier in earlier versions - -- of the language. - - if Token = Tok_Some and then Ada_Version < Ada_2012 then - null; - else - Error_Msg_Name_1 := Token_Name; - Error_Msg_SC ("reserved word* cannot be used as identifier!"); - Used_As_Identifier (Token) := True; - end if; + Error_Msg_Name_1 := Token_Name; + Error_Msg_SC ("reserved word* cannot be used as identifier!"); + Used_As_Identifier (Token) := True; end if; Token := Tok_Identifier; |