diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5f34d8f6cfc..19d6eb08761 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,30 @@ +2015-01-06 Pascal Obry + + * bindgen.adb: Minor style fix. + +2015-01-06 Robert Dewar + + * sem_util.ads, sem_util.adb: Minor reformatting. + +2015-01-06 Vincent Celier + + * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete + with flags before parsing the projects. + * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs. + * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs + to True in the flags, when Ignore_Missing_With is True and an + imported project cannot be found. + * prj-proc.adb (Expression): When there are incomplete withs and + a variable or attribute is not found, set the variable/attribute + to unknown. + * prj.ads (Processing_Flags): New flag Incomplete_Withs, + defaulted to False. + +2015-01-06 Vasiliy Fofanov + + * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb, + prj-err.adb: Add new switch --no-command-line. + 2015-01-06 Ed Schonberg * sem_ch12.adb: Sloc of wrapper is that of instantiation. diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index 9a5c1a8017e..9f4f105dddd 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -941,7 +941,7 @@ package body Bindgen is WBI (" System.Elaboration_Allocators.Mark_End_Of_Elaboration;"); end if; - -- From this point, no new dispatching domain can be created. + -- From this point, no new dispatching domain can be created if Dispatching_Domains_Used then WBI (" Freeze_Dispatching_Domains;"); diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 9e487dbb4ff..ba1a8f2a9a4 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -19247,6 +19247,13 @@ status if at least one test fails or crashes. @var{val} can be either Suppresses comment line containing file name and line number of corresponding subprograms in test skeletons. +@item --no-command-line +@cindex @option{--no-command-line} (@command{gnattest}) +Don't add command line support to test driver. Note that regardless of this +switch, @command{gnattest} will automatically refrain from adding command +line support if it detects that the selected run-time doesn't provide +this capability. + @item --separates @cindex @option{--separates} (@command{gnattest}) diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb index 84c3dd64aae..4ab035d1ef3 100644 --- a/gcc/ada/prj-conf.adb +++ b/gcc/ada/prj-conf.adb @@ -1652,6 +1652,8 @@ package body Prj.Conf is -- Parse the user project tree + Project_Node_Tree.Incomplete_With := False; + Env.Flags.Incomplete_Withs := False; Prj.Initialize (Project_Tree); Main_Project := No_Project; diff --git a/gcc/ada/prj-err.adb b/gcc/ada/prj-err.adb index 75cf23b7bfc..e6e6dd3b8e5 100644 --- a/gcc/ada/prj-err.adb +++ b/gcc/ada/prj-err.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-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- -- @@ -72,6 +72,10 @@ package body Prj.Err is Real_Location : Source_Ptr := Location; begin + if Flags.Incomplete_Withs then + return; + end if; + -- Display the error message in the traces so that it appears in the -- correct location in the traces (otherwise error messages are only -- displayed at the end and it is difficult to see when they were diff --git a/gcc/ada/prj-part.adb b/gcc/ada/prj-part.adb index 234ccdc172f..c4cf2da8c88 100644 --- a/gcc/ada/prj-part.adb +++ b/gcc/ada/prj-part.adb @@ -895,6 +895,7 @@ package body Prj.Part is if Imported_Path_Name_Id = No_Path then if Env.Flags.Ignore_Missing_With then In_Tree.Incomplete_With := True; + Env.Flags.Incomplete_Withs := True; else -- The project file cannot be found diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb index 71ac4213b0f..ac2cc66ce31 100644 --- a/gcc/ada/prj-proc.adb +++ b/gcc/ada/prj-proc.adb @@ -819,11 +819,23 @@ package body Prj.Proc is end if; - pragma Assert (The_Variable_Id /= No_Variable, - "variable or attribute not found"); + if From_Project_Node_Tree.Incomplete_With then + if The_Variable_Id = No_Variable then + The_Variable := Nil_Variable_Value; + else + The_Variable := + Shared.Variable_Elements.Table + (The_Variable_Id).Value; + end if; - The_Variable := - Shared.Variable_Elements.Table (The_Variable_Id).Value; + else + pragma Assert (The_Variable_Id /= No_Variable, + "variable or attribute not found"); + + The_Variable := + Shared.Variable_Elements.Table + (The_Variable_Id).Value; + end if; else diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb index b696e2a7f48..9da0f448564 100644 --- a/gcc/ada/prj.adb +++ b/gcc/ada/prj.adb @@ -1934,7 +1934,8 @@ package body Prj is Require_Obj_Dirs => Require_Obj_Dirs, Allow_Invalid_External => Allow_Invalid_External, Missing_Source_Files => Missing_Source_Files, - Ignore_Missing_With => Ignore_Missing_With); + Ignore_Missing_With => Ignore_Missing_With, + Incomplete_Withs => False); end Create_Flags; ------------ diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads index 6266a0ad012..935f3de510f 100644 --- a/gcc/ada/prj.ads +++ b/gcc/ada/prj.ads @@ -2051,6 +2051,11 @@ private Allow_Invalid_External : Error_Warning; Missing_Source_Files : Error_Warning; Ignore_Missing_With : Boolean; + + Incomplete_Withs : Boolean := False; + -- This flag is set to True when the projects are parsed while ignoring + -- missing withed project and some withed projects are not found. + end record; Gprbuild_Flags : constant Processing_Flags := @@ -2063,7 +2068,8 @@ private Require_Obj_Dirs => Error, Allow_Invalid_External => Error, Missing_Source_Files => Error, - Ignore_Missing_With => False); + Ignore_Missing_With => False, + Incomplete_Withs => False); Gprinstall_Flags : constant Processing_Flags := (Report_Error => null, @@ -2075,7 +2081,8 @@ private Require_Obj_Dirs => Silent, Allow_Invalid_External => Error, Missing_Source_Files => Error, - Ignore_Missing_With => False); + Ignore_Missing_With => False, + Incomplete_Withs => False); Gprclean_Flags : constant Processing_Flags := (Report_Error => null, @@ -2087,7 +2094,8 @@ private Require_Obj_Dirs => Warning, Allow_Invalid_External => Error, Missing_Source_Files => Error, - Ignore_Missing_With => False); + Ignore_Missing_With => False, + Incomplete_Withs => False); Gprexec_Flags : constant Processing_Flags := (Report_Error => null, @@ -2099,7 +2107,8 @@ private Require_Obj_Dirs => Silent, Allow_Invalid_External => Error, Missing_Source_Files => Silent, - Ignore_Missing_With => False); + Ignore_Missing_With => False, + Incomplete_Withs => False); Gnatmake_Flags : constant Processing_Flags := (Report_Error => null, @@ -2111,6 +2120,7 @@ private Require_Obj_Dirs => Error, Allow_Invalid_External => Error, Missing_Source_Files => Error, - Ignore_Missing_With => False); + Ignore_Missing_With => False, + Incomplete_Withs => False); end Prj; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index b8e22ea8be2..b0fcc17da47 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -5065,23 +5065,22 @@ package body Sem_Util is end if; end Select_Node; - -- Start of processing for Designate_Next_Unit + -- Start of processing for Designate_Same_Unit begin - if (K1 = N_Identifier or else K1 = N_Defining_Identifier) + if Nkind_In (K1, N_Identifier, N_Defining_Identifier) and then - (K2 = N_Identifier or else K2 = N_Defining_Identifier) + Nkind_In (K2, N_Identifier, N_Defining_Identifier) then return Chars (Name1) = Chars (Name2); - elsif - (K1 = N_Expanded_Name or else - K1 = N_Selected_Component or else - K1 = N_Defining_Program_Unit_Name) - and then - (K2 = N_Expanded_Name or else - K2 = N_Selected_Component or else - K2 = N_Defining_Program_Unit_Name) + elsif Nkind_In (K1, N_Expanded_Name, + N_Selected_Component, + N_Defining_Program_Unit_Name) + and then + Nkind_In (K2, N_Expanded_Name, + N_Selected_Component, + N_Defining_Program_Unit_Name) then return (Chars (Select_Node (Name1)) = Chars (Select_Node (Name2))) diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 162c4b6068b..040a7d65d4e 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -504,7 +504,7 @@ package Sem_Util is function Designate_Same_Unit (Name1 : Node_Id; Name2 : Node_Id) return Boolean; - -- Return true if Name1 and Name2 designate the same unit name; each of + -- Returns True if Name1 and Name2 designate the same unit name; each of -- these names is supposed to be a selected component name, an expanded -- name, a defining program unit name or an identifier.