]> gcc.gnu.org Git - gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 6 Jan 2015 10:30:54 +0000 (11:30 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 6 Jan 2015 10:30:54 +0000 (11:30 +0100)
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.

From-SVN: r219252

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 5f34d8f6cfca4ffa7971a6171c07c21492f9572c..19d6eb08761ba3573db45fc341b9da11c3daa09a 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 9a5c1a8017e13c796a4371280b7bdce15c9e950e..9f4f105dddd3f0f0d7c638b3dc0402c20a75a612 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 9e487dbb4ffc6b399477553b1aa1955c81ae82c6..ba1a8f2a9a420810955e2849b293dca32da896ec 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 84c3dd64aae936c86b7076e1716607efaa333e34..4ab035d1ef347be1e3e9880513bddf90f2dffee6 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 75cf23b7bfc70983afc2138d6dd300eb99529840..e6e6dd3b8e5cbc98b5596c5fdf1c8603b2e0619b 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 234ccdc172f5540c5bdfcdb0bce12598a7ba8f61..c4cf2da8c886f207c36ca746cb56f5c28ff4f595 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 71ac4213b0ff19ecdf9288a703072180adff0614..ac2cc66ce3125954462f2ea859828aeabef05c42 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 b696e2a7f485c4e883e5e67e696aae444bbb3875..9da0f4485646c5e3f78936a1889a89e06fd7e8a7 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 6266a0ad012a6b483a2c5855e5593d89f39beffa..935f3de510f3bc99b5bc4c53ebc51cdb631c7cf1 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 b8e22ea8be2f241049584b2a9b3bf3137a527432..b0fcc17da47abd5dbe47b7c493960b85fa8cfc65 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 162c4b6068b28d55f67ec32d982078c6897c6e12..040a7d65d4e64ce642d8013a8d5de8b3db5f270a 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.
 
This page took 0.110175 seconds and 5 git commands to generate.