summaryrefslogtreecommitdiff
path: root/gcc/ada/prj-dect.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-19 16:24:17 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-19 16:24:17 +0000
commit0cd59c118d696092aaead1d09db59591ce085e3b (patch)
treea44749e3f074425c00c87c4a0ca9db1580651b37 /gcc/ada/prj-dect.adb
parent3558902e0e9d43e1c4c6ecf6f9997e5784fb4d04 (diff)
downloadgcc-0cd59c118d696092aaead1d09db59591ce085e3b.tar.gz
2007-12-19 Vincent Celier <celier@adacore.com>
* prj-attr.adb (Package_Node_Id_Of): Returns Unknown_Package when package is not known * prj-attr.ads (Unknown_Package): New constant Do not crash when an unknown package is in several projects * prj-dect.adb (Parse_Package_Declaration): Mark an unknown package as ignored * prj-nmsc.adb (Check): Remove obsolete code related to no longer existing package Language_Processing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131078 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-dect.adb')
-rw-r--r--gcc/ada/prj-dect.adb15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ada/prj-dect.adb b/gcc/ada/prj-dect.adb
index 7e367a7e146..24c312e70ee 100644
--- a/gcc/ada/prj-dect.adb
+++ b/gcc/ada/prj-dect.adb
@@ -981,10 +981,7 @@ package body Prj.Dect is
Current_Package := Package_Node_Id_Of (Token_Name);
- if Current_Package /= Empty_Package then
- First_Attribute := First_Attribute_Of (Current_Package);
-
- else
+ if Current_Package = Empty_Package then
if not Quiet_Output then
Error_Msg ("?""" &
Get_Name_String
@@ -1001,6 +998,16 @@ package body Prj.Dect is
-- Add the unknown package in the list of packages
Add_Unknown_Package (Token_Name, Current_Package);
+
+ elsif Current_Package = Unknown_Package then
+
+ -- Set the package declaration to "ignored" so that it is not
+ -- processed by Prj.Proc.Process.
+
+ Set_Expression_Kind_Of (Package_Declaration, In_Tree, Ignored);
+
+ else
+ First_Attribute := First_Attribute_Of (Current_Package);
end if;
Set_Package_Id_Of