diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-01-30 12:33:53 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-01-30 12:33:53 +0100 |
commit | 1423761633d64bf0547ca2583fe4ef5cc67b4b83 (patch) | |
tree | cfcbda0dda9cc0c084e0a1268ea454d024802355 /gcc/ada/prj-nmsc.adb | |
parent | de6e4fc49410404bb589a382822a37656b37c577 (diff) | |
download | gcc-1423761633d64bf0547ca2583fe4ef5cc67b4b83.zip gcc-1423761633d64bf0547ca2583fe4ef5cc67b4b83.tar.gz gcc-1423761633d64bf0547ca2583fe4ef5cc67b4b83.tar.bz2 |
[multiple changes]
2012-01-30 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Check_Interfaces): Report an error when a
unit from Library_Interface is not a unit of the project.
2012-01-30 Vincent Pucci <pucci@adacore.com>
* sem_prag.adb (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Parent
links fixed inside PPC pragmas.
* sem_ch12.adb: Move call to Make_Aspect_For_PPC_In_Gen_Sub_Decl.
2012-01-30 Thomas Quinot <quinot@adacore.com>
* s-ransee.ads: Minor reformatting.
From-SVN: r183705
Diffstat (limited to 'gcc/ada/prj-nmsc.adb')
-rw-r--r-- | gcc/ada/prj-nmsc.adb | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index 00cc88a..0fbcd11 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -2556,6 +2556,8 @@ package body Prj.Nmsc is Interface_ALIs : String_List_Id := Nil_String; + Unit_Found : Boolean; + begin if not Interfaces.Default then @@ -2583,7 +2585,15 @@ package body Prj.Nmsc is Project_2 := Project; Big_Loop : while Project_2 /= No_Project loop - Iter := For_Each_Source (Data.Tree, Project_2); + if Project.Qualifier = Aggregate_Library then + -- For an aggregate library we want to consider sources of + -- all aggregated projects. + + Iter := For_Each_Source (Data.Tree); + + else + Iter := For_Each_Source (Data.Tree, Project_2); + end if; loop Source := Prj.Element (Iter); @@ -2680,11 +2690,20 @@ package body Prj.Nmsc is Get_Name_String (Element.Value); To_Lower (Name_Buffer (1 .. Name_Len)); Name := Name_Find; + Unit_Found := False; Project_2 := Project; Big_Loop_2 : while Project_2 /= No_Project loop - Iter := For_Each_Source (Data.Tree, Project_2); + if Project.Qualifier = Aggregate_Library then + -- For an aggregate library we want to consider sources of + -- all aggregated projects. + + Iter := For_Each_Source (Data.Tree); + + else + Iter := For_Each_Source (Data.Tree, Project_2); + end if; loop Source := Prj.Element (Iter); @@ -2731,6 +2750,7 @@ package body Prj.Nmsc is String_Element_Table.Last (Shared.String_Elements); end if; + Unit_Found := True; exit Big_Loop_2; end if; @@ -2740,6 +2760,15 @@ package body Prj.Nmsc is Project_2 := Project_2.Extends; end loop Big_Loop_2; + if not Unit_Found then + Error_Msg_Name_1 := Name_Id (Name); + + Error_Msg + (Data.Flags, + "%% is not a unit of this project", + Element.Location, Project); + end if; + List := Element.Next; end loop; |