diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-24 14:05:17 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-24 14:05:17 +0000 |
commit | 077cf123bba0bd53f30a0a6a1417e57e2391e4e8 (patch) | |
tree | cc7968fa417787b85b2e39f85773e76f1db53f9f /gcc/ada/prj-nmsc.adb | |
parent | c75e30abef14ec4f1044850f30e3bbc6b25e542b (diff) | |
download | gcc-077cf123bba0bd53f30a0a6a1417e57e2391e4e8.tar.gz |
2014-01-24 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Is_Post_State): In a postcondition, a selected
component that denotes an implicit dereference is a reference
to the post state of the subprogram.
2014-01-24 Robert Dewar <dewar@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
for generated subprograms.
(Analyze_Subprogram_Specification): Ditto.
2014-01-24 Vincent Celier <celier@adacore.com>
* prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
attributes in package Builder of aggregate and aggregate library
projects.
* prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
Remove parameters. Change error message from "... externally
build library ..." to "... externally built project ...".
(Process_Naming_Scheme.Check): Do not do any check in aggregate
project, as attribute Library_Dir and Library_Name have already
been detected as forbidden.
2014-01-24 Vincent Celier <celier@adacore.com>
* prj-env.adb (Find_Project): If cached project path is not in
project directory, look in current directory first and use cached
project path only if project is not found in project directory.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207032 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-nmsc.adb')
-rw-r--r-- | gcc/ada/prj-nmsc.adb | 76 |
1 files changed, 7 insertions, 69 deletions
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index eb647df1492..54c4e4e3a44 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -8395,71 +8395,14 @@ package body Prj.Nmsc is In_Aggregate_Lib : Boolean; Data : in out Tree_Processing_Data) is - procedure Check_Aggregate - (Project : Project_Id; - Data : in out Tree_Processing_Data); - -- Check the aggregate project attributes, reject any not supported - -- attributes. - - procedure Check_Aggregated - (Project : Project_Id; - Data : in out Tree_Processing_Data); - -- Check aggregated projects which should not be externally built. - -- What is Data??? if same as outer Data, why passed??? - -- What exact check is performed here??? Seems a bad idea to have - -- two procedures with such close names ??? - - --------------------- - -- Check_Aggregate -- - --------------------- - - procedure Check_Aggregate - (Project : Project_Id; - Data : in out Tree_Processing_Data) - is - procedure Check_Not_Defined (Name : Name_Id); - -- Report an error if Var is defined - - ----------------------- - -- Check_Not_Defined -- - ----------------------- - - procedure Check_Not_Defined (Name : Name_Id) is - Var : constant Prj.Variable_Value := - Prj.Util.Value_Of - (Name, Project.Decl.Attributes, Data.Tree.Shared); - begin - if not Var.Default then - Error_Msg_Name_1 := Name; - Error_Msg - (Data.Flags, "wrong attribute %% in aggregate library", - Var.Location, Project); - end if; - end Check_Not_Defined; - - -- Start of processing for Check_Aggregate - - begin - Check_Not_Defined (Snames.Name_Library_Dir); - Check_Not_Defined (Snames.Name_Library_Interface); - Check_Not_Defined (Snames.Name_Library_Name); - Check_Not_Defined (Snames.Name_Library_Ali_Dir); - Check_Not_Defined (Snames.Name_Library_Src_Dir); - Check_Not_Defined (Snames.Name_Library_Options); - Check_Not_Defined (Snames.Name_Library_Standalone); - Check_Not_Defined (Snames.Name_Library_Kind); - Check_Not_Defined (Snames.Name_Leading_Library_Options); - Check_Not_Defined (Snames.Name_Library_Version); - end Check_Aggregate; + procedure Check_Aggregated; + -- Check aggregated projects which should not be externally built ---------------------- -- Check_Aggregated -- ---------------------- - procedure Check_Aggregated - (Project : Project_Id; - Data : in out Tree_Processing_Data) - is + procedure Check_Aggregated is L : Aggregated_Project_List; begin @@ -8478,7 +8421,7 @@ package body Prj.Nmsc is Error_Msg_Name_1 := L.Project.Display_Name; Error_Msg (Data.Flags, - "cannot aggregate externally build library %%", + "cannot aggregate externally built project %%", Var.Location, Project); end if; end; @@ -8504,10 +8447,10 @@ package body Prj.Nmsc is case Project.Qualifier is when Aggregate => - Check_Aggregated (Project, Data); + Check_Aggregated; when Aggregate_Library => - Check_Aggregated (Project, Data); + Check_Aggregated; if Project.Object_Directory = No_Path_Information then Project.Object_Directory := Project.Directory; @@ -8532,12 +8475,7 @@ package body Prj.Nmsc is Check_Configuration (Project, Data); - -- For aggregate project check no library attributes are defined - - if Project.Qualifier = Aggregate then - Check_Aggregate (Project, Data); - - else + if Project.Qualifier /= Aggregate then Check_Library_Attributes (Project, Data); Check_Package_Naming (Project, Data); |