2015-01-06 Pascal Obry <obry@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Jan 2015 10:30:54 +0000 (10:30 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Jan 2015 10:30:54 +0000 (10:30 +0000)
* bindgen.adb: Minor style fix.

2015-01-06  Robert Dewar  <dewar@adacore.com>

* sem_util.ads, sem_util.adb: Minor reformatting.

2015-01-06  Vincent Celier  <celier@adacore.com>

* 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  <fofanov@adacore.com>

* prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
prj-err.adb: Add new switch --no-command-line.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219252 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/bindgen.adb
gcc/ada/gnat_ugn.texi
gcc/ada/prj-conf.adb
gcc/ada/prj-err.adb
gcc/ada/prj-part.adb
gcc/ada/prj-proc.adb
gcc/ada/prj.adb
gcc/ada/prj.ads
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads

index 5f34d8f..19d6eb0 100644 (file)
@@ -1,3 +1,30 @@
+2015-01-06  Pascal Obry  <obry@adacore.com>
+
+       * bindgen.adb: Minor style fix.
+
+2015-01-06  Robert Dewar  <dewar@adacore.com>
+
+       * sem_util.ads, sem_util.adb: Minor reformatting.
+
+2015-01-06  Vincent Celier  <celier@adacore.com>
+
+       * 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  <fofanov@adacore.com>
+
+       * 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  <schonberg@adacore.com>
 
        * sem_ch12.adb: Sloc of wrapper is that of instantiation.
index 9a5c1a8..9f4f105 100644 (file)
@@ -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;");
index 9e487db..ba1a8f2 100644 (file)
@@ -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})
index 84c3dd6..4ab035d 100644 (file)
@@ -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;
index 75cf23b..e6e6dd3 100644 (file)
@@ -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
index 234ccdc..c4cf2da 100644 (file)
@@ -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
index 71ac421..ac2cc66 100644 (file)
@@ -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
 
index b696e2a..9da0f44 100644 (file)
@@ -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;
 
    ------------
index 6266a0a..935f3de 100644 (file)
@@ -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;
index b8e22ea..b0fcc17 100644 (file)
@@ -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)))
index 162c4b6..040a7d6 100644 (file)
@@ -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.