diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-23 10:30:04 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-23 10:30:04 +0000 |
commit | d5b349fa420e378630f74691c65284888f6d5cca (patch) | |
tree | 340e9db670c45f7e10eeb8d937a4635e112b782a /gcc/ada/prj-part.adb | |
parent | 62b02bdf324f4978f124a998d1c1b04709a61fcb (diff) | |
download | gcc-d5b349fa420e378630f74691c65284888f6d5cca.tar.gz |
2004-01-23 Robert Dewar <dewar@gnat.com>
* exp_aggr.adb: Minor reformatting
* exp_ch9.adb: Minor code clean up
Minor reformatting
Fix bad character in comment
* targparm.adb (Get_Target_Parameters): Give clean abort error on
unexpected end of file, along with more detailed message.
2004-01-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* exp_pakd.adb (Install_PAT): Clear Freeze_Node for PAT and Etype of
PAT.
* decl.c (copy_alias_set): New function.
(gnat_to_gnu_entity, make_aligning_type, make_packable_type): Use it.
2004-01-23 Doug Rupp <rupp@gnat.com>
* Makefile.in (install-gnatlib): Change occurrences of lib$$file to
lib$${file} in case subsequent character is not a separator.
2004-01-23 Vincent Celier <celier@gnat.com>
* 5vml-tgt.adb (Build_Dynamic_Library): Invoke gcc with -shared-libgcc
when the GCC version is at least 3.
* make.adb: (Scan_Make_Arg): Pass -B to Scan_Make_Switches
Remove all "Opt.", to prepare for opt split
* prj-part.adb (Parse_Single_Project): New Boolean out parameter
Extends_All. Set to True when the project parsed is an extending all
project. Fails for importing an extending all project only when the
imported project is an extending all project.
(Post_Parse_Context_Clause): Set Is_Extending_All to the with clause,
depending on the value of Extends_All returned.
* prj-proc.adb (Process): Check that no project shares its object
directory with a project that extends it, directly or indirectly,
including a virtual project.
Check that no project extended by another project shares its object
directory with another also extended project.
* prj-tree.adb (Is_Extending_All, Set_Is_Extending_All): Allow for
Kind = N_With_Clause
* prj-tree.ads: Minor reformatting
Indicate that Flag2 also applies to N_With_Clause (Is_Extending_All).
2004-01-23 Ed Schonberg <schonberg@gnat.com>
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the attribute
applies to a type with an incomplete view, use full view in Name of
clause, for consistency with uses of Get_Attribute_Definition_Clause.
2004-01-23 Arnaud Charlet <charlet@act-europe.fr>
* 5itaprop.adb (Set_Priority): Reset the priority to 0 when using
SCHED_RR, since other values are not supported by this policy.
(Initialize): Move initialization of mutex attribute to package
elaboration, to prevent early access to this variable.
* Makefile.in: Remove mention of Makefile.adalib, unused.
* Makefile.adalib: Removed, unused.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76403 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-part.adb')
-rw-r--r-- | gcc/ada/prj-part.adb | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/gcc/ada/prj-part.adb b/gcc/ada/prj-part.adb index 1aa4725e46c..2415a3f31d1 100644 --- a/gcc/ada/prj-part.adb +++ b/gcc/ada/prj-part.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2004 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- -- @@ -26,7 +26,7 @@ with Err_Vars; use Err_Vars; with Namet; use Namet; -with Opt; +with Opt; use Opt; with Osint; use Osint; with Output; use Output; with Prj.Com; use Prj.Com; @@ -167,6 +167,7 @@ package body Prj.Part is procedure Parse_Single_Project (Project : out Project_Node_Id; + Extends_All : out Boolean; Path_Name : String; Extended : Boolean; From_Extended : Extension_Origin); @@ -431,6 +432,7 @@ package body Prj.Part is Store_Comments : Boolean := False) is Current_Directory : constant String := Get_Current_Dir; + Dummy : Boolean; begin -- Save the Packages_To_Check in Prj, so that it is visible from @@ -467,6 +469,7 @@ package body Prj.Part is Parse_Single_Project (Project => Project, + Extends_All => Dummy, Path_Name => Path_Name, Extended => False, From_Extended => None); @@ -678,6 +681,7 @@ package body Prj.Part is Current_With : With_Record; Limited_With : Boolean := False; + Extends_All : Boolean := False; begin Imported_Projects := Empty_Node; @@ -775,9 +779,13 @@ package body Prj.Part is if Withed_Project = Empty_Node then Parse_Single_Project (Project => Withed_Project, + Extends_All => Extends_All, Path_Name => Imported_Path_Name, Extended => False, From_Extended => From_Extended); + + else + Extends_All := Is_Extending_All (Withed_Project); end if; if Withed_Project = Empty_Node then @@ -805,6 +813,10 @@ package body Prj.Part is Name_Len := Imported_Path_Name'Length; Name_Buffer (1 .. Name_Len) := Imported_Path_Name; Set_Path_Name_Of (Current_Project, Name_Find); + + if Extends_All then + Set_Is_Extending_All (Current_Project); + end if; end if; end if; end; @@ -817,6 +829,7 @@ package body Prj.Part is procedure Parse_Single_Project (Project : out Project_Node_Id; + Extends_All : out Boolean; Path_Name : String; Extended : Boolean; From_Extended : Extension_Origin) @@ -843,6 +856,8 @@ package body Prj.Part is Project_Comment_State : Tree.Comment_State; begin + Extends_All := False; + declare Normed : String := Normalize_Pathname (Path_Name); begin @@ -908,6 +923,8 @@ package body Prj.Part is end if; elsif A_Project_Name_And_Node.Extended then + Extends_All := Is_Extending_All (A_Project_Name_And_Node.Node); + -- If the imported project is an extended project A, and we are -- in an extended project, replace A with the ultimate project -- extending A. @@ -1136,13 +1153,14 @@ package body Prj.Part is -- Make sure that gnatmake will use mapping files - Opt.Create_Mapping_File := True; + Create_Mapping_File := True; -- We are extending another project Scan; -- scan past EXTENDS if Token = Tok_All then + Extends_All := True; Set_Is_Extending_All (Project); Scan; -- scan past ALL end if; @@ -1196,6 +1214,7 @@ package body Prj.Part is Parse_Single_Project (Project => Extended_Project, + Extends_All => Extends_All, Path_Name => Extended_Project_Path_Name, Extended => True, From_Extended => From_Extended); @@ -1226,14 +1245,15 @@ package body Prj.Part is With_Clause_Loop : while With_Clause /= Empty_Node loop Imported := Project_Node_Of (With_Clause); - With_Clause := Next_With_Clause_Of (With_Clause); - if Is_Extending_All (Imported) then + if Is_Extending_All (With_Clause) then Error_Msg_Name_1 := Name_Of (Imported); Error_Msg ("cannot import extending-all project {", Token_Ptr); exit With_Clause_Loop; end if; + + With_Clause := Next_With_Clause_Of (With_Clause); end loop With_Clause_Loop; end; end if; |