aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/scn.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-10 15:32:09 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-10 15:32:09 +0200
commit043ce308074d55f57dbb05bb2e0253417f3d0174 (patch)
treea9617cffdcd3216494b5d8f6d2f2e270b9735a5a /gcc/ada/scn.adb
parent72df3faaf84f0ae75620cd25ee6c96e0465cc156 (diff)
downloadgcc-043ce308074d55f57dbb05bb2e0253417f3d0174.zip
gcc-043ce308074d55f57dbb05bb2e0253417f3d0174.tar.gz
gcc-043ce308074d55f57dbb05bb2e0253417f3d0174.tar.bz2
[multiple changes]
2009-04-10 Robert Dewar <dewar@adacore.com> * mlib-tgt-specific-xi.adb: Minor reformatting 2009-04-10 Bob Duff <duff@adacore.com> * einfo.ads: Minor comment fixes 2009-04-10 Vincent Celier <celier@adacore.com> * snames.ads-tmpl: Remove names that are no longer used in the Project Manager. Mark specifically those that are used only in gprbuild 2009-04-10 Eric Botcazou <ebotcazou@adacore.com> * init.c: Adjust EH support code on Alpha/Tru64. 2009-04-10 Bob Duff <duff@adacore.com> * sem_ch6.adb (Process_PPCs): Add a call to the _Postconditions procedure on every path that could return implicitly (not via a return statement) from a procedure. 2009-04-10 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Build_Master_Entity): An extended return statement is a valid scope for a task declarations and therefore for a master id. 2009-04-10 Robert Dewar <dewar@adacore.com> * sem_aux.adb: Minor reformatting 2009-04-10 Vincent Celier <celier@adacore.com> * scn.adb (Obsolescent_Check_Flag): New Boolean flag, initialized to True. (Obsolescent_Check): Do nothing if Obsolescent_Check_Flag is False (Set_Obsolescent_Check): New procedure to change the value of Obsolescent_Check_Flag. * scn.ads (Set_Obsolescent_Check): New procedure to control Obsolescent_Check. * sinput-l.adb (Load_File): Do not check for pragma Restrictions on obsolescent features while preprocessing. From-SVN: r145901
Diffstat (limited to 'gcc/ada/scn.adb')
-rw-r--r--gcc/ada/scn.adb28
1 files changed, 22 insertions, 6 deletions
diff --git a/gcc/ada/scn.adb b/gcc/ada/scn.adb
index 805caab..81dc49b 100644
--- a/gcc/ada/scn.adb
+++ b/gcc/ada/scn.adb
@@ -44,6 +44,10 @@ package body Scn is
use ASCII;
+ Obsolescent_Check_Flag : Boolean := True;
+ -- Obsolescent check activation. Set to False during integrated
+ -- preprocessing.
+
Used_As_Identifier : array (Token_Type) of Boolean;
-- Flags set True if a given keyword is used as an identifier (used to
-- make sure that we only post an error message for incorrect use of a
@@ -342,12 +346,15 @@ package body Scn is
procedure Obsolescent_Check (S : Source_Ptr) is
begin
- -- This is a pain in the neck case, since we normally need a node to
- -- call Check_Restrictions, and all we have is a source pointer. The
- -- easiest thing is to construct a dummy node. A bit kludgy, but this
- -- is a marginal case. It's not worth trying to do things more cleanly.
-
- Check_Restriction (No_Obsolescent_Features, New_Node (N_Empty, S));
+ if Obsolescent_Check_Flag then
+ -- This is a pain in the neck case, since we normally need a node to
+ -- call Check_Restrictions, and all we have is a source pointer. The
+ -- easiest thing is to construct a dummy node. A bit kludgy, but this
+ -- is a marginal case. It's not worth trying to do things more
+ -- cleanly.
+
+ Check_Restriction (No_Obsolescent_Features, New_Node (N_Empty, S));
+ end if;
end Obsolescent_Check;
---------------
@@ -420,4 +427,13 @@ package body Scn is
Set_Chars (Token_Node, Token_Name);
end Scan_Reserved_Identifier;
+ ---------------------------
+ -- Set_Obsolescent_Check --
+ ---------------------------
+
+ procedure Set_Obsolescent_Check (Value : Boolean) is
+ begin
+ Obsolescent_Check_Flag := Value;
+ end Set_Obsolescent_Check;
+
end Scn;