summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-29 10:28:55 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-29 10:28:55 +0000
commitff50836499c6eb91c2d89322f928ff468b5a886f (patch)
treeb72d92a8a2ecf450a2641b76b6e8d9505038ac4a /gcc
parenteb3aa0649ba102aa4b507f4295e3fffe9bdb16de (diff)
downloadppe42-gcc-ff50836499c6eb91c2d89322f928ff468b5a886f.tar.gz
ppe42-gcc-ff50836499c6eb91c2d89322f928ff468b5a886f.zip
2009-04-29 Ed Schonberg <schonberg@adacore.com>
* sem_disp.adb (Check_Dispatching_Operation): if the dispatching operation is a body without previous spec, update the list of primitive operations to ensure that cross-reference information is up-to-date. * sem_ch12.adb (Build_Instance_Compilation_Unit_Nodes): When creating a new compilation unit node for the instance declaration, keep the context items of the original unit on it, so that the context of the instance body only holds the context inherited from the generic body. 2009-04-29 Bob Duff <duff@adacore.com> * sem_res.adb: Minor comment fix. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146945 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog16
-rw-r--r--gcc/ada/sem_ch12.adb7
-rw-r--r--gcc/ada/sem_disp.adb11
-rw-r--r--gcc/ada/sem_res.adb2
4 files changed, 31 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index e2eaa614f51..c8767f10f58 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,19 @@
+2009-04-29 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_disp.adb (Check_Dispatching_Operation): if the dispatching
+ operation is a body without previous spec, update the list of
+ primitive operations to ensure that cross-reference information is
+ up-to-date.
+
+ * sem_ch12.adb (Build_Instance_Compilation_Unit_Nodes): When creating a
+ new compilation unit node for the instance declaration, keep the
+ context items of the original unit on it, so that the context of the
+ instance body only holds the context inherited from the generic body.
+
+2009-04-29 Bob Duff <duff@adacore.com>
+
+ * sem_res.adb: Minor comment fix.
+
2009-04-29 Thomas Quinot <quinot@adacore.com>
* sem_elim.adb: Minor reformatting
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index e56a0f3b796..9a4f1e34b41 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -4360,16 +4360,19 @@ package body Sem_Ch12 is
Old_Main : constant Entity_Id := Cunit_Entity (Main_Unit);
begin
- -- A new compilation unit node is built for the instance declaration
+ -- A new compilation unit node is built for the instance declaration.
+ -- Place the context of the compilation this declaration, so that it
+ -- it is processed before the instance in CodePeer.
Decl_Cunit :=
Make_Compilation_Unit (Sloc (N),
- Context_Items => Empty_List,
+ Context_Items => Context_Items (Parent (N)),
Unit => Act_Decl,
Aux_Decls_Node =>
Make_Compilation_Unit_Aux (Sloc (N)));
Set_Parent_Spec (Act_Decl, Parent_Spec (N));
+ Set_Context_Items (Parent (N), Empty_List);
-- The new compilation unit is linked to its body, but both share the
-- same file, so we do not set Body_Required on the new unit so as not
diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb
index 33044b3a810..c44c8e8d0fc 100644
--- a/gcc/ada/sem_disp.adb
+++ b/gcc/ada/sem_disp.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2009, 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- --
@@ -865,7 +865,14 @@ package body Sem_Disp is
Prim => Subp));
end if;
- Generate_Reference (Tagged_Type, Subp, 'p', False);
+ -- Indicate that this is an overriding operation,
+ -- and replace the overriden entry in the list of
+ -- primitive operations, which is used for xref
+ -- generation subsequently.
+
+ Generate_Reference (Tagged_Type, Subp, 'P', False);
+ Override_Dispatching_Operation
+ (Tagged_Type, Old_Subp, Subp);
end if;
end if;
end if;
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 690ade4827b..c6f79de4915 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -6977,7 +6977,7 @@ package body Sem_Res is
begin
-- The parser folds an enormous sequence of concatenations of string
-- literals into "" & "...", where the Is_Folded_In_Parser flag is set
- -- in the right. If the expression resolves to a predefined "&"
+ -- in the right operand. If the expression resolves to a predefined "&"
-- operator, all is well. Otherwise, the parser's folding is wrong, so
-- we give an error. See P_Simple_Expression in Par.Ch4.
OpenPOWER on IntegriCloud