summaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch3.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/par-ch3.adb')
-rw-r--r--gcc/ada/par-ch3.adb22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb
index 0d62eb8b0fa..642de80755f 100644
--- a/gcc/ada/par-ch3.adb
+++ b/gcc/ada/par-ch3.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- --
@@ -229,6 +229,16 @@ package body Ch3 is
end if;
end if;
+ -- Similarly, warn about Ada 2012 reserved words
+
+ if Ada_Version in Ada_95 .. Ada_2005
+ and then Warn_On_Ada_2012_Compatibility
+ then
+ if Token_Name = Name_Some then
+ Error_Msg_N ("& is a reserved word in Ada 2012?", Token_Node);
+ end if;
+ end if;
+
-- If we have a reserved identifier, manufacture an identifier with
-- a corresponding name after posting an appropriate error message
@@ -1125,16 +1135,6 @@ package body Ch3 is
Discard_Junk_Node (P_Array_Type_Definition);
return Error;
- -- If Some becomes a keyword, the following is needed to make it
- -- acceptable in older versions of Ada.
-
- elsif Token = Tok_Some
- and then Ada_Version < Ada_2012
- then
- Scan_Reserved_Identifier (False);
- Scan;
- return Token_Node;
-
else
Type_Node := P_Qualified_Simple_Name_Resync;