summaryrefslogtreecommitdiff
path: root/gcc/ada/prj-strt.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-30 10:02:20 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-30 10:02:20 +0000
commitea562988b0d0b1117711f1f2af92fd7348792798 (patch)
tree6de5d233a9fd49a361954351cf988c5482205b19 /gcc/ada/prj-strt.adb
parent50379ed41488c13036e51aa6d753857e46696a55 (diff)
downloadgcc-ea562988b0d0b1117711f1f2af92fd7348792798.tar.gz
2014-07-30 Gary Dismukes <dismukes@adacore.com>
* sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting. 2014-07-30 Vincent Celier <celier@adacore.com> * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean parameter No_Extending, defaulted to False. When No_Extending is True, do not look for an extending project. (Expression): For a variable reference that is not for the current project, get its Id calling Imported_Or_Extended_Project_From with No_Extending set to True. * prj-strt.adb (Parse_Variable_Reference): If a referenced variable is not found in the current project, check if it is defined in one of the projects it extends. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213237 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-strt.adb')
-rw-r--r--gcc/ada/prj-strt.adb13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ada/prj-strt.adb b/gcc/ada/prj-strt.adb
index 271a913e762..1ae9647efee 100644
--- a/gcc/ada/prj-strt.adb
+++ b/gcc/ada/prj-strt.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2014, 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- --
@@ -1162,7 +1162,7 @@ package body Prj.Strt is
-- If we have not found the variable in the package, check if the
-- variable has been declared in the project, or in any of its
- -- ancestors.
+ -- ancestors, or in any of the project it extends.
if No (Current_Variable) then
declare
@@ -1182,7 +1182,14 @@ package body Prj.Strt is
exit when Present (Current_Variable);
- Proj := Parent_Project_Of (Proj, In_Tree);
+ if No (Parent_Project_Of (Proj, In_Tree)) then
+ Proj :=
+ Extended_Project_Of
+ (Project_Declaration_Of (Proj, In_Tree), In_Tree);
+
+ else
+ Proj := Parent_Project_Of (Proj, In_Tree);
+ end if;
Set_Project_Node_Of (Variable, In_Tree, To => Proj);