Commit 2bd67690 by Robert Dewar Committed by Arnaud Charlet

debug.adb: Remove -gnatdQ.

2014-07-17  Robert Dewar  <dewar@adacore.com>

	* debug.adb: Remove -gnatdQ.
	* exp_disp.adb: Remove -gnatdQ.
	* a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
	a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
	rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
	a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
	sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
	a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.

From-SVN: r212725
parent 59f4d038
2014-07-17 Robert Dewar <dewar@adacore.com> 2014-07-17 Robert Dewar <dewar@adacore.com>
* debug.adb: Remove -gnatdQ.
* exp_disp.adb: Remove -gnatdQ.
* a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
2014-07-17 Robert Dewar <dewar@adacore.com>
* back_end.adb: Minor reformatting and comment additions. * back_end.adb: Minor reformatting and comment additions.
* checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
function. function.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- -- -- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. The copyright notice above, and the license provisions that follow --
...@@ -35,9 +35,10 @@ ...@@ -35,9 +35,10 @@
-- In Ada 95, the package Ada.Text_IO.Decimal_IO is a subpackage of Text_IO. -- In Ada 95, the package Ada.Text_IO.Decimal_IO is a subpackage of Text_IO.
-- This is for compatibility with Ada 83. In GNAT we make it a child package -- This is for compatibility with Ada 83. In GNAT we make it a child package
-- to avoid loading the necessary code if Decimal_IO is not instantiated. See -- to avoid loading the necessary code if Decimal_IO is not instantiated.
-- routine Rtsfind.Text_IO_Kludge for a description of how we patch up the -- See routine Rtsfind.Check_Text_IO_Special_Unit for a description of how
-- difference in semantics so that it is invisible to the Ada programmer. -- we patch up the difference in semantics so that it is invisible to the
-- Ada programmer.
private generic private generic
type Num is delta <> digits <>; type Num is delta <> digits <>;
......
...@@ -6,39 +6,19 @@ ...@@ -6,39 +6,19 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Text_IO.Enumeration_IO is a subpackage of -- In Ada 95, the package Ada.Text_IO.Enumeration_IO is a subpackage of
-- Text_IO. This is for compatibility with Ada 83. In GNAT we make it a -- Text_IO. This is for compatibility with Ada 83. In GNAT we make it a
-- child package to avoid loading the necessary code if Enumeration_IO is -- child package to avoid loading the necessary code if Enumeration_IO is
-- not instantiated. See routine Rtsfind.Text_IO_Kludge for a description -- not instantiated. See routine Rtsfind.Check_Text_IO_Special_Unit for a
-- of how we patch up the difference in semantics so that it is invisible -- description of how we patch up the difference in semantics so that it
-- to the Ada programmer. -- is invisible to the Ada programmer.
private generic private generic
type Enum is (<>); type Enum is (<>);
......
...@@ -6,38 +6,19 @@ ...@@ -6,38 +6,19 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Text_IO.Fixed_IO is a subpackage of Text_IO. -- In Ada 95, the package Ada.Text_IO.Fixed_IO is a subpackage of Text_IO.
-- This is for compatibility with Ada 83. In GNAT we make it a child package -- This is for compatibility with Ada 83. In GNAT we make it a child package
-- to avoid loading the necessary code if Fixed_IO is not instantiated. See -- to avoid loading the necessary code if Fixed_IO is not instantiated. See
-- routine Rtsfind.Text_IO_Kludge for a description of how we patch up the -- routine Rtsfind.Check_Text_IO_Special_Unit for a description of how we
-- difference in semantics so that it is invisible to the Ada programmer. -- patch up the difference in semantics so that it is invisible to the Ada
-- programmer.
private generic private generic
type Num is delta <>; type Num is delta <>;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- -- -- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. The copyright notice above, and the license provisions that follow --
...@@ -36,8 +36,9 @@ ...@@ -36,8 +36,9 @@
-- In Ada 95, the package Ada.Text_IO.Float_IO is a subpackage of Text_IO. -- In Ada 95, the package Ada.Text_IO.Float_IO is a subpackage of Text_IO.
-- This is for compatibility with Ada 83. In GNAT we make it a child package -- This is for compatibility with Ada 83. In GNAT we make it a child package
-- to avoid loading the necessary code if Float_IO is not instantiated. See -- to avoid loading the necessary code if Float_IO is not instantiated. See
-- routine Rtsfind.Text_IO_Kludge for a description of how we patch up the -- routine Rtsfind.Check_Text_IO_Special_Unit for a description of how we
-- difference in semantics so that it is invisible to the Ada programmer. -- patch up the difference in semantics so that it is invisible to the Ada
-- programmer.
private generic private generic
type Num is digits <>; type Num is digits <>;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- -- -- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. The copyright notice above, and the license provisions that follow --
...@@ -35,9 +35,10 @@ ...@@ -35,9 +35,10 @@
-- In Ada 95, the package Ada.Text_IO.Integer_IO is a subpackage of Text_IO. -- In Ada 95, the package Ada.Text_IO.Integer_IO is a subpackage of Text_IO.
-- This is for compatibility with Ada 83. In GNAT we make it a child package -- This is for compatibility with Ada 83. In GNAT we make it a child package
-- to avoid loading the necessary code if Integer_IO is not instantiated. See -- to avoid loading the necessary code if Integer_IO is not instantiated.
-- routine Rtsfind.Text_IO_Kludge for a description of how we patch up the -- See routine Rtsfind.Check_Text_IO_Special_Unit for a description of how
-- difference in semantics so that it is invisible to the Ada programmer. -- we patch up the difference in semantics so that it is invisible to the
-- Ada programmer.
private generic private generic
type Num is range <>; type Num is range <>;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1993-2009, Free Software Foundation, Inc. -- -- Copyright (C) 1993-2014, Free Software Foundation, Inc. --
-- -- -- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. The copyright notice above, and the license provisions that follow --
...@@ -35,9 +35,10 @@ ...@@ -35,9 +35,10 @@
-- In Ada 95, the package Ada.Text_IO.Modular_IO is a subpackage of Text_IO. -- In Ada 95, the package Ada.Text_IO.Modular_IO is a subpackage of Text_IO.
-- This is for compatibility with Ada 83. In GNAT we make it a child package -- This is for compatibility with Ada 83. In GNAT we make it a child package
-- to avoid loading the necessary code if Modular_IO is not instantiated. See -- to avoid loading the necessary code if Modular_IO is not instantiated.
-- routine Rtsfind.Text_IO_Kludge for a description of how we patch up the -- See routine Rtsfind.Check_Text_IO_Special_Unit for a description of how
-- difference in semantics so that it is invisible to the Ada programmer. -- we patch up the difference in semantics so that it is invisible to the
-- Ada programmer.
private generic private generic
type Num is mod <>; type Num is mod <>;
......
...@@ -6,38 +6,18 @@ ...@@ -6,38 +6,18 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Wide_Text_IO.Decimal_IO is a subpackage of -- In Ada 95, the package Ada.Wide_Text_IO.Decimal_IO is a subpackage
-- Wide_Text_IO. In GNAT we make it a child package to avoid loading the -- of Wide_Text_IO. In GNAT we make it a child package to avoid loading
-- necessary code if Decimal_IO is not instantiated. See the routine -- the necessary code if Decimal_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the -- Rtsfind.Check_Text_IO_Special_Unit for a description of how we patch up
-- difference in semantics so that it is invisible to the Ada programmer. -- the difference in semantics so that it is invisible to the Ada programmer.
private generic private generic
type Num is delta <> digits <>; type Num is delta <> digits <>;
......
...@@ -6,38 +6,18 @@ ...@@ -6,38 +6,18 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Wide_Text_IO.Enumeration_IO is a subpackage -- In Ada 95, the package Ada.Wide_Text_IO.Enumeration_IO is a subpackage
-- of Wide_Text_IO. In GNAT we make it a child package to avoid loading the -- of Wide_Text_IO. In GNAT we make it a child package to avoid loading the
-- necessary code if Enumeration_IO is not instantiated. See the routine -- necessary code if Enumeration_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the difference -- Rtsfind.Check_Text_IO_Special_Unit for a description of how we patch up
-- in semantics so that it is invisible to the Ada programmer. -- the difference in semantics so that it is invisible to the Ada programmer.
private generic private generic
type Enum is (<>); type Enum is (<>);
......
...@@ -6,38 +6,18 @@ ...@@ -6,38 +6,18 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Wide_Text_IO.Fixed_IO is a subpackage of -- In Ada 95, the package Ada.Wide_Text_IO.Fixed_IO is a subpackage of
-- Wide_Text_IO. In GNAT we make it a child package to avoid loading -- Wide_Text_IO. In GNAT we make it a child package to avoid loading
-- the necessary code if Fixed_IO is not instantiated. See the routine -- the necessary code if Fixed_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the -- Rtsfind.Check_Text_IO_Special_Unit for a description of how we patch up
-- difference in semantics so that it is invisible to the Ada programmer. -- the difference in semantics so that it is invisible to the Ada programmer.
private generic private generic
type Num is delta <>; type Num is delta <>;
......
...@@ -6,38 +6,18 @@ ...@@ -6,38 +6,18 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Wide_Text_IO.Float_IO is a subpackage -- In Ada 95, the package Ada.Wide_Text_IO.Float_IO is a subpackage of
-- of Wide_Text_IO. In GNAT we make it a child package to avoid loading -- Wide_Text_IO. In GNAT we make it a child package to avoid loading
-- the necessary code if Float_IO is not instantiated. See the routine -- the necessary code if Float_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the -- Rtsfind.Check_Text_IO_Special_Unit for a description of how we patch up
-- difference in semantics so that it is invisible to the Ada programmer. -- the difference in semantics so that it is invisible to the Ada programmer.
private generic private generic
type Num is digits <>; type Num is digits <>;
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
-- In Ada 95, the package Ada.Wide_Text_IO.Integer_IO is a subpackage -- In Ada 95, the package Ada.Wide_Text_IO.Integer_IO is a subpackage
-- of Wide_Text_IO. In GNAT we make it a child package to avoid loading -- of Wide_Text_IO. In GNAT we make it a child package to avoid loading
-- the necessary code if Integer_IO is not instantiated. See the routine -- the necessary code if Integer_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the -- Rtsfind.Check_Text_IO_Special_Unit for a description of how we patch up
-- difference in semantics so that it is invisible to the Ada programmer. -- the difference in semantics so that it is invisible to the Ada programmer.
private generic private generic
type Num is range <>; type Num is range <>;
......
...@@ -6,38 +6,20 @@ ...@@ -6,38 +6,20 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- -- -- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Wide_Text_IO.Modular_IO is a subpackage of -- In Ada 95, the package Ada.Wide_Text_IO.Modular_IO is a subpackage
-- Wide_Text_IO. In GNAT we make it a child package to avoid loading the -- of Wide_Text_IO. In GNAT we make it a child package to avoid loading
-- necessary code if Modular_IO is not instantiated. See the routine -- the necessary code if Modular_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the -- Rtsfind.Check_Text_IO_Special_Unit for a description of how we patch up
-- difference in semantics so that it is invisible to the Ada programmer. -- the difference in semantics so that it is invisible to the Ada programmer.
private generic private generic
type Num is mod <>; type Num is mod <>;
......
...@@ -6,26 +6,10 @@ ...@@ -6,26 +6,10 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- This specification is derived from the Ada Reference Manual for use with --
-- -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- copy and modify this specification, provided that if you redistribute a --
-- terms of the GNU General Public License as published by the Free Soft- -- -- modified version, any changes that you have made are clearly indicated. --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
......
...@@ -6,38 +6,18 @@ ...@@ -6,38 +6,18 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Wide_Wide_Text_IO.Decimal_IO is a subpackage of -- In Ada 95, the package Ada.Wide_Wide_Text_IO.Decimal_IO is a subpackage
-- Wide_Wide_Text_IO. In GNAT we make it a child package to avoid loading the -- of Wide_Wide_Text_IO. In GNAT we make it a child package to avoid loading
-- necessary code if Decimal_IO is not instantiated. See the routine -- the necessary code if Decimal_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the difference -- Rtsfind.Check_Text_IO_Special_Unit for a description of how we patch up
-- in semantics so that it is invisible to the Ada programmer. -- the difference in semantics so that it is invisible to the Ada programmer.
private generic private generic
type Num is delta <> digits <>; type Num is delta <> digits <>;
......
...@@ -6,39 +6,18 @@ ...@@ -6,39 +6,18 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Wide_Wide_Text_IO.Enumeration_IO is a -- In Ada 95, the package Ada.Wide_Wide_Text_IO.Enumeration_IO is a subpackage
-- subpackage of Wide_Wide_Text_IO. In GNAT we make it a child package to -- of Wide_Wide_Text_IO. In GNAT we make it a child package to avoid loading
-- avoid loading the necessary code if Enumeration_IO is not instantiated. -- the necessary code if Enumeration_IO is not instantiated. See the routine
-- See the routine Rtsfind.Text_IO_Kludge for a description of how we patch -- Rtsfind.Check_Text_IO_Special_Unit for a description of how we patch up the
-- up the difference in semantics so that it is invisible to the Ada -- difference in semantics so that it is invisible to the Ada programmer.
-- programmer.
private generic private generic
type Enum is (<>); type Enum is (<>);
......
...@@ -6,38 +6,18 @@ ...@@ -6,38 +6,18 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Wide_Wide_Text_IO.Fixed_IO is a subpackage of -- In Ada 95, the package Ada.Wide_Wide_Text_IO.Fixed_IO is a subpackage of
-- Wide_Wide_Text_IO. In GNAT we make it a child package to avoid loading -- Wide_Wide_Text_IO. In GNAT we make it a child package to avoid loading
-- the necessary code if Fixed_IO is not instantiated. See the routine -- the necessary code if Fixed_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the -- Rtsfind.Check_Text_IO_Special_Unit for a description of how we patch up
-- difference in semantics so that it is invisible to the Ada programmer. -- the difference in semantics so that it is invisible to the Ada programmer.
private generic private generic
type Num is delta <>; type Num is delta <>;
......
...@@ -6,38 +6,18 @@ ...@@ -6,38 +6,18 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Wide_Wide_Text_IO.Float_IO is a subpackage -- In Ada 95, the package Ada.Wide_Wide_Text_IO.Float_IO is a subpackage of
-- of Wide_Wide_Text_IO. In GNAT we make it a child package to avoid loading -- Wide_Wide_Text_IO. In GNAT we make it a child package to avoid loading
-- the necessary code if Float_IO is not instantiated. See the routine -- the necessary code if Float_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the -- Rtsfind.Check_Text_IO_Special_Unit for a description of how we patch up
-- difference in semantics so that it is invisible to the Ada programmer. -- the difference in semantics so that it is invisible to the Ada programmer.
private generic private generic
type Num is digits <>; type Num is digits <>;
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
-- In Ada 95, the package Ada.Wide_Wide_Text_IO.Integer_IO is a subpackage -- In Ada 95, the package Ada.Wide_Wide_Text_IO.Integer_IO is a subpackage
-- of Wide_Wide_Text_IO. In GNAT we make it a child package to avoid loading -- of Wide_Wide_Text_IO. In GNAT we make it a child package to avoid loading
-- the necessary code if Integer_IO is not instantiated. See the routine -- the necessary code if Integer_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the -- Rtsfind.Check_Text_IO_Special_Unit for a description of how we patch up
-- difference in semantics so that it is invisible to the Ada programmer. -- the difference in semantics so that it is invisible to the Ada programmer.
private generic private generic
type Num is range <>; type Num is range <>;
......
...@@ -6,38 +6,18 @@ ...@@ -6,38 +6,18 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. In accordance with the copyright of that document, you can freely --
-- apply solely to the contents of the part following the private keyword. -- -- copy and modify this specification, provided that if you redistribute a --
-- -- -- modified version, any changes that you have made are clearly indicated. --
-- 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Wide_Wide_Text_IO.Modular_IO is a subpackage of -- In Ada 95, the package Ada.Wide_Wide_Text_IO.Modular_IO is a subpackage
-- Wide_Wide_Text_IO. In GNAT we make it a child package to avoid loading the -- of Wide_Wide_Text_IO. In GNAT we make it a child package to avoid loading
-- necessary code if Modular_IO is not instantiated. See the routine -- the necessary code if Modular_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the -- Rtsfind.Check_Text_IO_Special_Unit for a description of how we patch up
-- difference in semantics so that it is invisible to the Ada programmer. -- the difference in semantics so that it is invisible to the Ada programmer.
private generic private generic
type Num is mod <>; type Num is mod <>;
......
...@@ -80,7 +80,7 @@ package body Debug is ...@@ -80,7 +80,7 @@ package body Debug is
-- dN No file name information in exception messages -- dN No file name information in exception messages
-- dO Output immediate error messages -- dO Output immediate error messages
-- dP Do not check for controlled objects in preelaborable packages -- dP Do not check for controlled objects in preelaborable packages
-- dQ Do not generate runtime check for duplicated external tag -- dQ
-- dR Bypass check for correct version of s-rpc -- dR Bypass check for correct version of s-rpc
-- dS Never convert numbers to machine numbers in Sem_Eval -- dS Never convert numbers to machine numbers in Sem_Eval
-- dT Convert to machine numbers only for constant declarations -- dT Convert to machine numbers only for constant declarations
...@@ -438,12 +438,6 @@ package body Debug is ...@@ -438,12 +438,6 @@ package body Debug is
-- in preelaborable packages, but this restriction is a huge pain, -- in preelaborable packages, but this restriction is a huge pain,
-- especially in the predefined library units. -- especially in the predefined library units.
-- dQ Eliminate check for duplicate external tags. This check was added
-- as per AI 0113, and causes some backward compatibility problems.
-- It is never legitimate to have duplicate external tags, so the
-- check is certainly valid, but this debug switch can be useful for
-- enabling previous behavior of ignoring this problem.
-- dR Bypass the check for a proper version of s-rpc being present -- dR Bypass the check for a proper version of s-rpc being present
-- to use the -gnatz? switch. This allows debugging of the use -- to use the -gnatz? switch. This allows debugging of the use
-- of stubs generation without needing to have GLADE (or some -- of stubs generation without needing to have GLADE (or some
......
...@@ -6226,7 +6226,6 @@ package body Exp_Disp is ...@@ -6226,7 +6226,6 @@ package body Exp_Disp is
if not No_Run_Time_Mode if not No_Run_Time_Mode
and then Ada_Version >= Ada_2005 and then Ada_Version >= Ada_2005
and then RTE_Available (RE_Check_TSD) and then RTE_Available (RE_Check_TSD)
and then not Debug_Flag_QQ
and then not Duplicated_Tag_Checks_Suppressed (Typ) and then not Duplicated_Tag_Checks_Suppressed (Typ)
then then
Append_To (Elab_Code, Append_To (Elab_Code,
...@@ -6815,7 +6814,6 @@ package body Exp_Disp is ...@@ -6815,7 +6814,6 @@ package body Exp_Disp is
if Ada_Version >= Ada_2005 if Ada_Version >= Ada_2005
and then Is_Library_Level_Entity (Typ) and then Is_Library_Level_Entity (Typ)
and then RTE_Available (RE_Check_TSD) and then RTE_Available (RE_Check_TSD)
and then not Debug_Flag_QQ
and then not Duplicated_Tag_Checks_Suppressed (Typ) and then not Duplicated_Tag_Checks_Suppressed (Typ)
then then
Append_To (Result, Append_To (Result,
......
...@@ -173,9 +173,9 @@ package body Rtsfind is ...@@ -173,9 +173,9 @@ package body Rtsfind is
-- for the Is_Potentially_Use_Visible flag of the entity for the loaded -- for the Is_Potentially_Use_Visible flag of the entity for the loaded
-- unit (if it is indeed loaded). A value of False means nothing special -- unit (if it is indeed loaded). A value of False means nothing special
-- need be done. A value of True indicates that this flag must be set to -- need be done. A value of True indicates that this flag must be set to
-- True. It is needed only in the Text_IO_Kludge procedure, which may -- True. It is needed only in the Check_Text_IO_Special_Unit procedure,
-- materialize an entity of Text_IO (or [Wide_]Wide_Text_IO) that was -- which may materialize an entity of Text_IO (or [Wide_]Wide_Text_IO) that
-- previously unknown. Id is the RE_Id value of the entity which was -- was previously unknown. Id is the RE_Id value of the entity which was
-- originally requested. Id is used only for error message detail, and if -- originally requested. Id is used only for error message detail, and if
-- it is RE_Null, then the attempt to output the entity name is ignored. -- it is RE_Null, then the attempt to output the entity name is ignored.
...@@ -264,6 +264,144 @@ package body Rtsfind is ...@@ -264,6 +264,144 @@ package body Rtsfind is
end if; end if;
end Check_CRT; end Check_CRT;
--------------------------------
-- Check_Text_IO_Special_Unit --
--------------------------------
procedure Check_Text_IO_Special_Unit (Nam : Node_Id) is
Chrs : Name_Id;
type Name_Map_Type is array (Text_IO_Package_Name) of RTU_Id;
Name_Map : constant Name_Map_Type := Name_Map_Type'(
Name_Decimal_IO => Ada_Text_IO_Decimal_IO,
Name_Enumeration_IO => Ada_Text_IO_Enumeration_IO,
Name_Fixed_IO => Ada_Text_IO_Fixed_IO,
Name_Float_IO => Ada_Text_IO_Float_IO,
Name_Integer_IO => Ada_Text_IO_Integer_IO,
Name_Modular_IO => Ada_Text_IO_Modular_IO);
Wide_Name_Map : constant Name_Map_Type := Name_Map_Type'(
Name_Decimal_IO => Ada_Wide_Text_IO_Decimal_IO,
Name_Enumeration_IO => Ada_Wide_Text_IO_Enumeration_IO,
Name_Fixed_IO => Ada_Wide_Text_IO_Fixed_IO,
Name_Float_IO => Ada_Wide_Text_IO_Float_IO,
Name_Integer_IO => Ada_Wide_Text_IO_Integer_IO,
Name_Modular_IO => Ada_Wide_Text_IO_Modular_IO);
Wide_Wide_Name_Map : constant Name_Map_Type := Name_Map_Type'(
Name_Decimal_IO => Ada_Wide_Wide_Text_IO_Decimal_IO,
Name_Enumeration_IO => Ada_Wide_Wide_Text_IO_Enumeration_IO,
Name_Fixed_IO => Ada_Wide_Wide_Text_IO_Fixed_IO,
Name_Float_IO => Ada_Wide_Wide_Text_IO_Float_IO,
Name_Integer_IO => Ada_Wide_Wide_Text_IO_Integer_IO,
Name_Modular_IO => Ada_Wide_Wide_Text_IO_Modular_IO);
To_Load : RTU_Id;
-- Unit to be loaded, from one of the above maps
begin
-- Nothing to do if name is not an identifier or a selected component
-- whose selector_name is an identifier.
if Nkind (Nam) = N_Identifier then
Chrs := Chars (Nam);
elsif Nkind (Nam) = N_Selected_Component
and then Nkind (Selector_Name (Nam)) = N_Identifier
then
Chrs := Chars (Selector_Name (Nam));
else
return;
end if;
-- Nothing to do if name is not one of the Text_IO subpackages
-- Otherwise look through loaded units, and if we find Text_IO
-- or [Wide_]Wide_Text_IO already loaded, then load the proper child.
if Chrs in Text_IO_Package_Name then
for U in Main_Unit .. Last_Unit loop
Get_Name_String (Unit_File_Name (U));
if Name_Len = 12 then
-- Here is where we do the loads if we find one of the units
-- Ada.Text_IO or Ada.[Wide_]Wide_Text_IO. An interesting
-- detail is that these units may already be used (i.e. their
-- In_Use flags may be set). Normally when the In_Use flag is
-- set, the Is_Potentially_Use_Visible flag of all entities in
-- the package is set, but the new entity we are mysteriously
-- adding was not there to have its flag set at the time. So
-- that's why we pass the extra parameter to RTU_Find, to make
-- sure the flag does get set now. Given that those generic
-- packages are in fact child units, we must indicate that
-- they are visible.
if Name_Buffer (1 .. 12) = "a-textio.ads" then
To_Load := Name_Map (Chrs);
elsif Name_Buffer (1 .. 12) = "a-witeio.ads" then
To_Load := Wide_Name_Map (Chrs);
elsif Name_Buffer (1 .. 12) = "a-ztexio.ads" then
To_Load := Wide_Wide_Name_Map (Chrs);
else
goto Continue;
end if;
Load_RTU (To_Load, Use_Setting => In_Use (Cunit_Entity (U)));
Set_Is_Visible_Lib_Unit (RT_Unit_Table (To_Load).Entity);
-- Prevent creation of an implicit 'with' from (for example)
-- Ada.Wide_Text_IO.Integer_IO to Ada.Text_IO.Integer_IO,
-- because these could create cycles. First check whether the
-- simple names match ("integer_io" = "integer_io"), and then
-- check whether the parent is indeed one of the
-- [[Wide_]Wide_]Text_IO packages.
if Chrs = Chars (Cunit_Entity (Current_Sem_Unit)) then
declare
Parent_Name : constant Unit_Name_Type :=
Get_Parent_Spec_Name
(Unit_Name (Current_Sem_Unit));
begin
if Parent_Name /= No_Unit_Name then
Get_Name_String (Parent_Name);
declare
P : String renames Name_Buffer (1 .. Name_Len);
begin
if P = "ada.text_io%s" or else
P = "ada.wide_text_io%s" or else
P = "ada.wide_wide_text_io%s"
then
goto Continue;
end if;
end;
end if;
end;
end if;
-- Add an implicit with clause from the current unit to the
-- [[Wide_]Wide_]Text_IO child (if necessary).
Maybe_Add_With (RT_Unit_Table (To_Load));
end if;
<<Continue>> null;
end loop;
end if;
exception
-- Generate error message if run-time unit not available
when RE_Not_Available =>
Error_Msg_N ("& not available", Nam);
end Check_Text_IO_Special_Unit;
------------------------ ------------------------
-- Entity_Not_Defined -- -- Entity_Not_Defined --
------------------------ ------------------------
...@@ -515,11 +653,11 @@ package body Rtsfind is ...@@ -515,11 +653,11 @@ package body Rtsfind is
return Present (E) and then E = Ent; return Present (E) and then E = Ent;
end Is_RTU; end Is_RTU;
---------------------------- -----------------------------
-- Is_Text_IO_Kludge_Unit -- -- Is_Text_IO_Special_Unit --
---------------------------- -----------------------------
function Is_Text_IO_Kludge_Unit (Nam : Node_Id) return Boolean is function Is_Text_IO_Special_Unit (Nam : Node_Id) return Boolean is
Prf : Node_Id; Prf : Node_Id;
Sel : Node_Id; Sel : Node_Id;
...@@ -549,7 +687,7 @@ package body Rtsfind is ...@@ -549,7 +687,7 @@ package body Rtsfind is
Name_Wide_Wide_Text_IO) Name_Wide_Wide_Text_IO)
and then Nkind (Sel) = N_Identifier and then Nkind (Sel) = N_Identifier
and then Chars (Sel) in Text_IO_Package_Name; and then Chars (Sel) in Text_IO_Package_Name;
end Is_Text_IO_Kludge_Unit; end Is_Text_IO_Special_Unit;
--------------- ---------------
-- Load_Fail -- -- Load_Fail --
...@@ -1381,142 +1519,4 @@ package body Rtsfind is ...@@ -1381,142 +1519,4 @@ package body Rtsfind is
end loop; end loop;
end Set_RTU_Loaded; end Set_RTU_Loaded;
--------------------
-- Text_IO_Kludge --
--------------------
procedure Text_IO_Kludge (Nam : Node_Id) is
Chrs : Name_Id;
type Name_Map_Type is array (Text_IO_Package_Name) of RTU_Id;
Name_Map : constant Name_Map_Type := Name_Map_Type'(
Name_Decimal_IO => Ada_Text_IO_Decimal_IO,
Name_Enumeration_IO => Ada_Text_IO_Enumeration_IO,
Name_Fixed_IO => Ada_Text_IO_Fixed_IO,
Name_Float_IO => Ada_Text_IO_Float_IO,
Name_Integer_IO => Ada_Text_IO_Integer_IO,
Name_Modular_IO => Ada_Text_IO_Modular_IO);
Wide_Name_Map : constant Name_Map_Type := Name_Map_Type'(
Name_Decimal_IO => Ada_Wide_Text_IO_Decimal_IO,
Name_Enumeration_IO => Ada_Wide_Text_IO_Enumeration_IO,
Name_Fixed_IO => Ada_Wide_Text_IO_Fixed_IO,
Name_Float_IO => Ada_Wide_Text_IO_Float_IO,
Name_Integer_IO => Ada_Wide_Text_IO_Integer_IO,
Name_Modular_IO => Ada_Wide_Text_IO_Modular_IO);
Wide_Wide_Name_Map : constant Name_Map_Type := Name_Map_Type'(
Name_Decimal_IO => Ada_Wide_Wide_Text_IO_Decimal_IO,
Name_Enumeration_IO => Ada_Wide_Wide_Text_IO_Enumeration_IO,
Name_Fixed_IO => Ada_Wide_Wide_Text_IO_Fixed_IO,
Name_Float_IO => Ada_Wide_Wide_Text_IO_Float_IO,
Name_Integer_IO => Ada_Wide_Wide_Text_IO_Integer_IO,
Name_Modular_IO => Ada_Wide_Wide_Text_IO_Modular_IO);
To_Load : RTU_Id;
-- Unit to be loaded, from one of the above maps
begin
-- Nothing to do if name is not an identifier or a selected component
-- whose selector_name is an identifier.
if Nkind (Nam) = N_Identifier then
Chrs := Chars (Nam);
elsif Nkind (Nam) = N_Selected_Component
and then Nkind (Selector_Name (Nam)) = N_Identifier
then
Chrs := Chars (Selector_Name (Nam));
else
return;
end if;
-- Nothing to do if name is not one of the Text_IO subpackages
-- Otherwise look through loaded units, and if we find Text_IO
-- or [Wide_]Wide_Text_IO already loaded, then load the proper child.
if Chrs in Text_IO_Package_Name then
for U in Main_Unit .. Last_Unit loop
Get_Name_String (Unit_File_Name (U));
if Name_Len = 12 then
-- Here is where we do the loads if we find one of the units
-- Ada.Text_IO or Ada.[Wide_]Wide_Text_IO. An interesting
-- detail is that these units may already be used (i.e. their
-- In_Use flags may be set). Normally when the In_Use flag is
-- set, the Is_Potentially_Use_Visible flag of all entities in
-- the package is set, but the new entity we are mysteriously
-- adding was not there to have its flag set at the time. So
-- that's why we pass the extra parameter to RTU_Find, to make
-- sure the flag does get set now. Given that those generic
-- packages are in fact child units, we must indicate that
-- they are visible.
if Name_Buffer (1 .. 12) = "a-textio.ads" then
To_Load := Name_Map (Chrs);
elsif Name_Buffer (1 .. 12) = "a-witeio.ads" then
To_Load := Wide_Name_Map (Chrs);
elsif Name_Buffer (1 .. 12) = "a-ztexio.ads" then
To_Load := Wide_Wide_Name_Map (Chrs);
else
goto Continue;
end if;
Load_RTU (To_Load, Use_Setting => In_Use (Cunit_Entity (U)));
Set_Is_Visible_Lib_Unit (RT_Unit_Table (To_Load).Entity);
-- Prevent creation of an implicit 'with' from (for example)
-- Ada.Wide_Text_IO.Integer_IO to Ada.Text_IO.Integer_IO,
-- because these could create cycles. First check whether the
-- simple names match ("integer_io" = "integer_io"), and then
-- check whether the parent is indeed one of the
-- [[Wide_]Wide_]Text_IO packages.
if Chrs = Chars (Cunit_Entity (Current_Sem_Unit)) then
declare
Parent_Name : constant Unit_Name_Type :=
Get_Parent_Spec_Name
(Unit_Name (Current_Sem_Unit));
begin
if Parent_Name /= No_Unit_Name then
Get_Name_String (Parent_Name);
declare
P : String renames Name_Buffer (1 .. Name_Len);
begin
if P = "ada.text_io%s" or else
P = "ada.wide_text_io%s" or else
P = "ada.wide_wide_text_io%s"
then
goto Continue;
end if;
end;
end if;
end;
end if;
-- Add an implicit with clause from the current unit to the
-- [[Wide_]Wide_]Text_IO child (if necessary).
Maybe_Add_With (RT_Unit_Table (To_Load));
end if;
<<Continue>> null;
end loop;
end if;
exception
-- Generate error message if run-time unit not available
when RE_Not_Available =>
Error_Msg_N ("& not available", Nam);
end Text_IO_Kludge;
end Rtsfind; end Rtsfind;
...@@ -169,7 +169,7 @@ package Rtsfind is ...@@ -169,7 +169,7 @@ package Rtsfind is
Ada_Strings_Wide_Wide_Superbounded, Ada_Strings_Wide_Wide_Superbounded,
Ada_Strings_Unbounded, Ada_Strings_Unbounded,
-- Children of Ada.Text_IO (for Text_IO_Kludge) -- Children of Ada.Text_IO (for Check_Text_IO_Special_Unit)
Ada_Text_IO_Decimal_IO, Ada_Text_IO_Decimal_IO,
Ada_Text_IO_Enumeration_IO, Ada_Text_IO_Enumeration_IO,
...@@ -178,7 +178,7 @@ package Rtsfind is ...@@ -178,7 +178,7 @@ package Rtsfind is
Ada_Text_IO_Integer_IO, Ada_Text_IO_Integer_IO,
Ada_Text_IO_Modular_IO, Ada_Text_IO_Modular_IO,
-- Children of Ada.Wide_Text_IO (for Text_IO_Kludge) -- Children of Ada.Wide_Text_IO (for Check_Text_IO_Special_Unit)
Ada_Wide_Text_IO_Decimal_IO, Ada_Wide_Text_IO_Decimal_IO,
Ada_Wide_Text_IO_Enumeration_IO, Ada_Wide_Text_IO_Enumeration_IO,
...@@ -187,7 +187,7 @@ package Rtsfind is ...@@ -187,7 +187,7 @@ package Rtsfind is
Ada_Wide_Text_IO_Integer_IO, Ada_Wide_Text_IO_Integer_IO,
Ada_Wide_Text_IO_Modular_IO, Ada_Wide_Text_IO_Modular_IO,
-- Children of Ada.Wide_Wide_Text_IO (for Text_IO_Kludge) -- Children of Ada.Wide_Wide_Text_IO (for Check_Text_IO_Special_Unit)
Ada_Wide_Wide_Text_IO_Decimal_IO, Ada_Wide_Wide_Text_IO_Decimal_IO,
Ada_Wide_Wide_Text_IO_Enumeration_IO, Ada_Wide_Wide_Text_IO_Enumeration_IO,
...@@ -3204,6 +3204,20 @@ package Rtsfind is ...@@ -3204,6 +3204,20 @@ package Rtsfind is
-- occur either because the file in which the entity should be found -- occur either because the file in which the entity should be found
-- does not exist, or because the entity is not present in the file. -- does not exist, or because the entity is not present in the file.
procedure Check_Text_IO_Special_Unit (Nam : Node_Id);
-- In Ada 83, and hence for compatibility in later versions of Ada, package
-- Text_IO has generic subpackages (e.g. Integer_IO). They really should be
-- child packages, and in GNAT, they *are* child packages. To maintain the
-- required compatibility, this routine is called for package renamings and
-- generic instantiations, with the simple name of the referenced package.
-- If Text_IO has been with'ed and if the simple name of Nam matches
-- one of the subpackages of Text_IO, then this subpackage is with'ed
-- automatically. The important result of this approach is that Text_IO
-- does not drag in all the code for the subpackages unless they are used.
-- Our test is a little crude, and could drag in stuff when it is not
-- necessary, but that is acceptable. Wide_[Wide_]Text_IO is handled in
-- a similar manner.
procedure Initialize; procedure Initialize;
-- Procedure to initialize data structures used by RTE. Called at the -- Procedure to initialize data structures used by RTE. Called at the
-- start of processing a new main source file. Must be called after -- start of processing a new main source file. Must be called after
...@@ -3226,11 +3240,11 @@ package Rtsfind is ...@@ -3226,11 +3240,11 @@ package Rtsfind is
-- entity id values are compared and True is returned if Ent is the -- entity id values are compared and True is returned if Ent is the
-- entity for this unit. -- entity for this unit.
function Is_Text_IO_Kludge_Unit (Nam : Node_Id) return Boolean; function Is_Text_IO_Special_Unit (Nam : Node_Id) return Boolean;
-- Returns True if the given Nam is an Expanded Name, whose Prefix is Ada, -- Returns True if the given Nam is an Expanded Name, whose Prefix is Ada,
-- and whose selector is either Text_IO.xxx or Wide_Text_IO.xxx or -- and whose selector is either Text_IO.xxx or Wide_Text_IO.xxx or
-- Wide_Wide_Text_IO.xxx, where xxx is one of the subpackages of Text_IO -- Wide_Wide_Text_IO.xxx, where xxx is one of the subpackages of Text_IO
-- that is specially handled as described below for Text_IO_Kludge. -- that is specially handled as described for Check_Text_IO_Special_Unit.
function RTE (E : RE_Id) return Entity_Id; function RTE (E : RE_Id) return Entity_Id;
-- Given the entity defined in the above tables, as identified by the -- Given the entity defined in the above tables, as identified by the
...@@ -3306,18 +3320,4 @@ package Rtsfind is ...@@ -3306,18 +3320,4 @@ package Rtsfind is
procedure Set_RTU_Loaded (N : Node_Id); procedure Set_RTU_Loaded (N : Node_Id);
-- Register the predefined unit N as already loaded -- Register the predefined unit N as already loaded
procedure Text_IO_Kludge (Nam : Node_Id);
-- In Ada 83, and hence for compatibility in Ada 9X, package Text_IO has
-- generic subpackages (e.g. Integer_IO). They really should be child
-- packages, and in GNAT, they *are* child packages. To maintain the
-- required compatibility, this routine is called for package renamings
-- and generic instantiations, with the simple name of the referenced
-- package. If Text_IO has been with'ed and if the simple name of Nam
-- matches one of the subpackages of Text_IO, then this subpackage is
-- with'ed automatically. The important result of this approach is that
-- Text_IO does not drag in all the code for the subpackages unless they
-- are used. Our test is a little crude, and could drag in stuff when it
-- is not necessary, but that doesn't matter. Wide_[Wide_]Text_IO is
-- handled in a similar manner.
end Rtsfind; end Rtsfind;
...@@ -2362,7 +2362,7 @@ package body Sem_Ch12 is ...@@ -2362,7 +2362,7 @@ package body Sem_Ch12 is
-- Start of processing for Analyze_Formal_Package_Declaration -- Start of processing for Analyze_Formal_Package_Declaration
begin begin
Text_IO_Kludge (Gen_Id); Check_Text_IO_Special_Unit (Gen_Id);
Init_Env; Init_Env;
Check_Generic_Child_Unit (Gen_Id, Parent_Installed); Check_Generic_Child_Unit (Gen_Id, Parent_Installed);
...@@ -3426,7 +3426,7 @@ package body Sem_Ch12 is ...@@ -3426,7 +3426,7 @@ package body Sem_Ch12 is
-- Very first thing: apply the special kludge for Text_IO processing -- Very first thing: apply the special kludge for Text_IO processing
-- in case we are instantiating one of the children of [Wide_]Text_IO. -- in case we are instantiating one of the children of [Wide_]Text_IO.
Text_IO_Kludge (Name (N)); Check_Text_IO_Special_Unit (Name (N));
-- Make node global for error reporting -- Make node global for error reporting
...@@ -4675,7 +4675,7 @@ package body Sem_Ch12 is ...@@ -4675,7 +4675,7 @@ package body Sem_Ch12 is
-- Of course such an instantiation is bogus (these are packages, not -- Of course such an instantiation is bogus (these are packages, not
-- subprograms), but we get a better error message if we do this. -- subprograms), but we get a better error message if we do this.
Text_IO_Kludge (Gen_Id); Check_Text_IO_Special_Unit (Gen_Id);
-- Make node global for error reporting -- Make node global for error reporting
......
...@@ -628,7 +628,7 @@ package body Sem_Ch8 is ...@@ -628,7 +628,7 @@ package body Sem_Ch8 is
-- Apply the Text_IO Kludge here, since we may be renaming one of the -- Apply the Text_IO Kludge here, since we may be renaming one of the
-- subpackages of Text_IO, then join common routine. -- subpackages of Text_IO, then join common routine.
Text_IO_Kludge (Name (N)); Check_Text_IO_Special_Unit (Name (N));
Analyze_Generic_Renaming (N, E_Generic_Package); Analyze_Generic_Renaming (N, E_Generic_Package);
end Analyze_Generic_Package_Renaming; end Analyze_Generic_Package_Renaming;
...@@ -1319,7 +1319,7 @@ package body Sem_Ch8 is ...@@ -1319,7 +1319,7 @@ package body Sem_Ch8 is
-- Apply Text_IO kludge here since we may be renaming a child of Text_IO -- Apply Text_IO kludge here since we may be renaming a child of Text_IO
Text_IO_Kludge (Name (N)); Check_Text_IO_Special_Unit (Name (N));
if Current_Scope /= Standard_Standard then if Current_Scope /= Standard_Standard then
Set_Is_Pure (New_P, Is_Pure (Current_Scope)); Set_Is_Pure (New_P, Is_Pure (Current_Scope));
......
...@@ -209,7 +209,7 @@ package Snames is ...@@ -209,7 +209,7 @@ package Snames is
Name_Deallocate : constant Name_Id := N + $; Name_Deallocate : constant Name_Id := N + $;
Name_Dereference : constant Name_Id := N + $; Name_Dereference : constant Name_Id := N + $;
-- Names of Text_IO generic subpackages (see Rtsfind.Text_IO_Kludge) -- Text_IO generic subpackages (see Rtsfind.Check_Text_IO_Special_Unit)
First_Text_IO_Package : constant Name_Id := N + $; First_Text_IO_Package : constant Name_Id := N + $;
Name_Decimal_IO : constant Name_Id := N + $; Name_Decimal_IO : constant Name_Id := N + $;
......
...@@ -3307,7 +3307,7 @@ package body Sprint is ...@@ -3307,7 +3307,7 @@ package body Sprint is
-- correspond to the non-existent children of Text_IO. -- correspond to the non-existent children of Text_IO.
if Dump_Original_Only if Dump_Original_Only
and then Is_Text_IO_Kludge_Unit (Name (Node)) and then Is_Text_IO_Special_Unit (Name (Node))
then then
null; null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment