summaryrefslogtreecommitdiff
path: root/gcc/ada/scn.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/scn.adb')
-rw-r--r--gcc/ada/scn.adb16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ada/scn.adb b/gcc/ada/scn.adb
index 5e8fbbf2298..a60d28e1fe8 100644
--- a/gcc/ada/scn.adb
+++ b/gcc/ada/scn.adb
@@ -28,6 +28,8 @@ with Atree; use Atree;
with Csets; use Csets;
with Namet; use Namet;
with Opt; use Opt;
+with Restrict; use Restrict;
+with Rident; use Rident;
with Scans; use Scans;
with Sinfo; use Sinfo;
with Sinput; use Sinput;
@@ -321,6 +323,20 @@ package body Scn is
end loop;
end Initialize_Scanner;
+ -----------------------
+ -- Obsolescent_Check --
+ -----------------------
+
+ 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));
+ end Obsolescent_Check;
+
------------------------------
-- Scan_Reserved_Identifier --
------------------------------