From 0f96fd143cd249110dcdeabea7fd8972b91b86c6 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Tue, 25 Apr 2017 13:37:18 +0000 Subject: err_vars.ads, [...]: Eliminate the vestigial Internal_Source_File and the Internal_Source buffer. 2017-04-25 Bob Duff * 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 --- gcc/ada/scn.adb | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'gcc/ada/scn.adb') 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 -- cgit v1.1