summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-09 12:10:15 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-09 12:10:15 +0000
commitb56de1bc469bf0871d2801ab4536da086cf5e7a6 (patch)
treeba168198e1d71f02176ffd34efa5fad62bb6db42 /gcc
parent8e58adedb84424f61133e374c843541d797b13d0 (diff)
downloadppe42-gcc-b56de1bc469bf0871d2801ab4536da086cf5e7a6.tar.gz
ppe42-gcc-b56de1bc469bf0871d2801ab4536da086cf5e7a6.zip
2009-04-09 Robert Dewar <dewar@adacore.com>
* g-comver.adb: Minor reformatting. 2009-04-09 Thomas Quinot <quinot@adacore.com> * lib-load.ads (Load_Unit): Update documentation. 2009-04-09 Ed Schonberg <schonberg@adacore.com> * lib-load.adb (Load_Unit): When loading the parent of a child unit named in a with_clause, retain the with_clause to preserve a limited_with indication. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145829 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog14
-rw-r--r--gcc/ada/g-comver.adb3
-rw-r--r--gcc/ada/lib-load.adb5
-rw-r--r--gcc/ada/lib-load.ads8
4 files changed, 24 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7db0fd48c01..3f908f78b98 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,19 @@
2009-04-09 Robert Dewar <dewar@adacore.com>
+ * g-comver.adb: Minor reformatting.
+
+2009-04-09 Thomas Quinot <quinot@adacore.com>
+
+ * lib-load.ads (Load_Unit): Update documentation.
+
+2009-04-09 Ed Schonberg <schonberg@adacore.com>
+
+ * lib-load.adb (Load_Unit): When loading the parent of a child unit
+ named in a with_clause, retain the with_clause to preserve a
+ limited_with indication.
+
+2009-04-09 Robert Dewar <dewar@adacore.com>
+
* sem_ch7.adb, sem_ch10.adb, sem_prag.adb, sem_ch12.adb, sem_util.adb,
exp_ch13.adb, sem_ch6.adb, exp_disp.adb, sem_ch8.adb, sem_warn.adb,
sem_cat.adb: Code clean up: use Is_Package_Or_Generic_Package where
diff --git a/gcc/ada/g-comver.adb b/gcc/ada/g-comver.adb
index 2d7b909a848..7a6baa102f7 100644
--- a/gcc/ada/g-comver.adb
+++ b/gcc/ada/g-comver.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2002-2005,2008 AdaCore --
+-- Copyright (C) 2002-2008, AdaCore --
-- --
-- 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- --
@@ -59,6 +59,7 @@ package body GNAT.Compiler_Version is
if GNAT_Version (J) = ')' then
return GNAT_Version (Ver_Prefix'Length + 1 .. J);
end if;
+
if GNAT_Version (J) = Character'Val (0) then
return GNAT_Version (Ver_Prefix'Length + 1 .. J - 1);
end if;
diff --git a/gcc/ada/lib-load.adb b/gcc/ada/lib-load.adb
index 29a9090f90e..1ceb389d553 100644
--- a/gcc/ada/lib-load.adb
+++ b/gcc/ada/lib-load.adb
@@ -358,6 +358,8 @@ package body Lib.Load is
begin
-- If renamings are allowed and we have a child unit name, then we
-- must first load the parent to deal with finding the real name.
+ -- Retain the with_clause that names the child, so that if it is
+ -- limited, the parent is loaded under the same condition.
if Renamings and then Is_Child_Name (Load_Name) then
Unump :=
@@ -366,7 +368,8 @@ package body Lib.Load is
Required => Required,
Subunit => False,
Renamings => True,
- Error_Node => Error_Node);
+ Error_Node => Error_Node,
+ With_Node => With_Node);
if Unump = No_Unit then
return No_Unit;
diff --git a/gcc/ada/lib-load.ads b/gcc/ada/lib-load.ads
index ef191e17331..cc2be76bc8f 100644
--- a/gcc/ada/lib-load.ads
+++ b/gcc/ada/lib-load.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, 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- --
@@ -148,9 +148,9 @@ package Lib.Load is
-- set to True, then Load_Name may not be the real unit name and it
-- is necessary to load parents to find the real name.
--
- -- From_Limited_With is True if we are loading a unit X found in a
- -- limited-with clause, or some unit in the context of X. It is used to
- -- avoid the check on circular dependency (Ada 2005, AI-50217)
+ -- With_Node is set to the with_clause or limited_with_clause causing
+ -- the unit to be loaded, and is used to bypass the circular dependency
+ -- check in the case of a limited_with_clause (Ada 2005, AI-50217).
procedure Change_Main_Unit_To_Spec;
-- This procedure is called if the main unit file contains a No_Body pragma
OpenPOWER on IntegriCloud