diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-13 10:13:36 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-13 10:13:36 +0000 |
commit | 9d0eada4dd5a8ba4d4bfc77793ca48c291aa1b8b (patch) | |
tree | 731bb955325533b2b0c1662f3a2e9445eba13ef4 /gcc/ada/par-util.adb | |
parent | 32bbaadb051faae0c21853ff8ca19416ff08b5a3 (diff) | |
download | gcc-9d0eada4dd5a8ba4d4bfc77793ca48c291aa1b8b.tar.gz |
2011-10-13 Thomas Quinot <quinot@adacore.com>
* par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
(Check_Future_Identifier): New subprogram,
factors duplicated code from Par.Ch2.P_Identifier and
Par.Ch3.P_Defining_Identifier.
2011-10-13 Thomas Quinot <quinot@adacore.com>
* s-taprop-posix.adb (Initialize): Always raise Storage_Error
if we fail to initialize CV attributes or CV.
2011-10-13 Thomas Quinot <quinot@adacore.com>
* s-tasren.adb (Timed_Selective_Wait, case
Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
we know abortion is already deferred.
2011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
(Build_Master_Renaming (function)): Removed.
(Build_Master_Renaming (procedure)): Moved to exp_ch9.
(Expand_Full_Type_Declaration): Alphabetize
variables. Reformatting of code and comments. Rewrite the
section on processing of anonymous access-to-task types in
record components.
* exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
(Build_Master_Renaming): Moved to exp_ch9.
* exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
(Build_Master_Entity): Add formal parameter
Use_Current. Reformatting of code and comments.
(Build_Master_Renaming): Moved from exp_ch3.
* exp_ch9.ads (Build_Class_Wide_Master): Moved from
exp_ch3. Update comment on usage.
(Build_Master_Entity):
Add formal parameter Use_Current. Update comment on usage.
(Build_Master_Renaming): Moved from exp_ch3.
* sem_ch3.adb (Access_Definition): Remove redundant code to
create a _master and a renaming.
2011-10-13 Ed Schonberg <schonberg@adacore.com>
* lib-xref.adb: Do no emit reference to overridden operation,
if it is internally generated.
2011-10-13 Vincent Celier <celier@adacore.com>
* bindgen.adb: Remove any processing related to g-trasym
* Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
* mlib-prj.adb: Remove any processing related to g-trasym.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179898 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/par-util.adb')
-rw-r--r-- | gcc/ada/par-util.adb | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/gcc/ada/par-util.adb b/gcc/ada/par-util.adb index 6a0e8efc6cb..32a3a88e556 100644 --- a/gcc/ada/par-util.adb +++ b/gcc/ada/par-util.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- -- @@ -169,6 +169,43 @@ package body Util is end Check_Bad_Layout; -------------------------- + -- Check_Future_Keyword -- + -------------------------- + + procedure Check_Future_Keyword is + begin + -- Ada 2005 (AI-284): Compiling in Ada95 mode we warn that INTERFACE, + -- OVERRIDING, and SYNCHRONIZED are new reserved words. + + if Ada_Version = Ada_95 + and then Warn_On_Ada_2005_Compatibility + then + if Token_Name = Name_Overriding + or else Token_Name = Name_Synchronized + or else (Token_Name = Name_Interface + and then Prev_Token /= Tok_Pragma) + then + Error_Msg_N ("& is a reserved word in Ada 2005?", Token_Node); + 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; + + -- Note: we deliberately do not emit these warnings when operating in + -- Ada 83 mode because in that case we assume the user is building + -- legacy code anyway. + + end Check_Future_Keyword; + + -------------------------- -- Check_Misspelling_Of -- -------------------------- |