aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/scn.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2017-04-25 13:37:18 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2017-04-25 15:37:18 +0200
commit0f96fd143cd249110dcdeabea7fd8972b91b86c6 (patch)
treefa63d732e414c06875cdb37cbfc725c72890f52b /gcc/ada/scn.adb
parent7d5dbb22ec8e0c1f104539d3fdf2afc5174a5b45 (diff)
downloadgcc-0f96fd143cd249110dcdeabea7fd8972b91b86c6.zip
gcc-0f96fd143cd249110dcdeabea7fd8972b91b86c6.tar.gz
gcc-0f96fd143cd249110dcdeabea7fd8972b91b86c6.tar.bz2
err_vars.ads, [...]: Eliminate the vestigial Internal_Source_File and the Internal_Source buffer.
2017-04-25 Bob Duff <duff@adacore.com> * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb, types.adb, types.ads, types.h, sinput-l.adb, targparm.adb, errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb, scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and the Internal_Source buffer. This removes the incorrect call to "=" the customer noticed. Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We eventually need to eliminate them altogether. Or else get rid of zero-origin addressing. From-SVN: r247234
Diffstat (limited to 'gcc/ada/scn.adb')
-rw-r--r--gcc/ada/scn.adb29
1 files changed, 5 insertions, 24 deletions
diff --git a/gcc/ada/scn.adb b/gcc/ada/scn.adb
index f5a5190..7dc0dc5 100644
--- a/gcc/ada/scn.adb
+++ b/gcc/ada/scn.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2017, 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- --
@@ -209,21 +209,14 @@ package body Scn is
begin
Scanner.Initialize_Scanner (Index);
-
- if Index /= Internal_Source_File then
- Set_Unit (Index, Unit);
- end if;
+ Set_Unit (Index, Unit);
Current_Source_Unit := Unit;
- -- Set default for Comes_From_Source (except if we are going to process
- -- an artificial string internally created within the compiler and
- -- placed into internal source duffer). All nodes built now until we
+ -- Set default for Comes_From_Source. All nodes built now until we
-- reenter the analyzer will have Comes_From_Source set to True
- if Index /= Internal_Source_File then
- Set_Comes_From_Source_Default (True);
- end if;
+ Set_Comes_From_Source_Default (True);
-- Check license if GNAT type header possibly present
@@ -239,19 +232,7 @@ package body Scn is
-- call Scan. Scan initial token (note this initializes Prev_Token,
-- Prev_Token_Ptr).
- -- There are two reasons not to do the Scan step in case if we
- -- initialize the scanner for the internal source buffer:
-
- -- - The artificial string may not be created by the compiler in this
- -- buffer when we call Initialize_Scanner
-
- -- - For these artificial strings a special way of scanning is used, so
- -- the standard step of the scanner may just break the algorithm of
- -- processing these strings.
-
- if Index /= Internal_Source_File then
- Scan;
- end if;
+ Scan;
-- Clear flags for reserved words used as identifiers