[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 26 Jan 2010 09:56:25 +0000 (10:56 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 26 Jan 2010 09:56:25 +0000 (10:56 +0100)
2010-01-26  Vincent Celier  <celier@adacore.com>

* gnat_ugn.texi: Complete documentation on the restrictions for
combined options in -gnatxxx switches.
Fix typo.

2010-01-26  Arnaud Charlet  <charlet@adacore.com>

* s-tpoben.adb (Initialize_Protection_Entries): If a PO is created from
a controlled operation, abort is already deferred at this point, so we
need to use Defer_Abort_Nestable.

2010-01-26  Vincent Celier  <celier@adacore.com>

* prj-conf.adb (Get_Config_Switches): Check for a default language for
a project extending a project with no languages.

From-SVN: r156237

gcc/ada/ChangeLog
gcc/ada/gnat_ugn.texi
gcc/ada/prj-conf.adb
gcc/ada/s-tpoben.adb

index 9c17576..3884aa4 100644 (file)
@@ -1,5 +1,22 @@
 2010-01-26  Vincent Celier  <celier@adacore.com>
 
+       * gnat_ugn.texi: Complete documentation on the restrictions for
+       combined options in -gnatxxx switches.
+       Fix typo.
+
+2010-01-26  Arnaud Charlet  <charlet@adacore.com>
+
+       * s-tpoben.adb (Initialize_Protection_Entries): If a PO is created from
+       a controlled operation, abort is already deferred at this point, so we
+       need to use Defer_Abort_Nestable.
+
+2010-01-26  Vincent Celier  <celier@adacore.com>
+
+       * prj-conf.adb (Get_Config_Switches): Check for a default language for
+       a project extending a project with no languages.
+
+2010-01-26  Vincent Celier  <celier@adacore.com>
+
        * switch-c.adb (Scan_Front_End_Switches): Take into account options
        that follow -gnatef.
        Allow -gnateG to be followed by other options.
index 42e3b91..7cb31f2 100644 (file)
@@ -390,8 +390,8 @@ GNAT Project Manager
 
 The Cross-Referencing Tools gnatxref and gnatfind
 
-* gnatxref Switches::
-* gnatfind Switches::
+* Switches for gnatxref::
+* Switches for gnatfind::
 * Project Files for gnatxref and gnatfind::
 * Regular Expressions in gnatfind and gnatxref::
 * Examples of gnatxref Usage::
@@ -4595,6 +4595,10 @@ as warning mode modifiers (see description of @option{-gnatw}).
 Once a ``V'' appears in the string (that is a use of the @option{-gnatV}
 switch), then all further characters in the switch are interpreted
 as validity checking options (@pxref{Validity Checking}).
+
+@item
+Option ``em'', ``ec'', ``ep'', ``l='' and ``R'' must be the last options in
+a combined list of options.
 @end ifclear
 @end itemize
 
@@ -15377,15 +15381,15 @@ Note: to invoke @code{gnatxref} or @code{gnatfind} with a project file,
 use the @code{gnat} driver (see @ref{The GNAT Driver and Project Files}).
 
 @menu
-* gnatxref Switches::
-* gnatfind Switches::
+* Switches for gnatxref::
+* Switches for gnatfind::
 * Project Files for gnatxref and gnatfind::
 * Regular Expressions in gnatfind and gnatxref::
 * Examples of gnatxref Usage::
 * Examples of gnatfind Usage::
 @end menu
 
-@node gnatxref Switches
+@node Switches for gnatxref
 @section @code{gnatxref} Switches
 
 @noindent
@@ -15516,7 +15520,7 @@ appear after the file names. They need not be separated by spaces, thus
 you can say @samp{gnatxref ^-ag^/ALL_FILES/IGNORE_LOCALS^} instead of
 @samp{gnatxref ^-a -g^/ALL_FILES /IGNORE_LOCALS^}.
 
-@node gnatfind Switches
+@node Switches for gnatfind
 @section @code{gnatfind} Switches
 
 @noindent
index 30823a3..dfebd9a 100644 (file)
@@ -516,6 +516,8 @@ package body Prj.Conf is
          Count    : Natural;
          Result   : Argument_List_Access;
 
+         Check_Default : Boolean;
+
       begin
          Prj_Iter := Project_Tree.Projects;
          while Prj_Iter /= null loop
@@ -530,9 +532,23 @@ package body Prj.Conf is
                  or else Variable.Default
                then
                   --  Languages is not declared. If it is not an extending
-                  --  project, check for Default_Language
+                  --  project, or if it extends a project with no Languages,
+                  --  check for Default_Language.
+
+                  Check_Default := Prj_Iter.Project.Extends = No_Project;
+
+                  if not Check_Default then
+                     Variable :=
+                       Value_Of
+                         (Name_Languages,
+                          Prj_Iter.Project.Extends.Decl.Attributes,
+                          Project_Tree);
+                     Check_Default :=
+                       Variable /= Nil_Variable_Value
+                         and then Variable.Values = Nil_String;
+                  end if;
 
-                  if Prj_Iter.Project.Extends = No_Project then
+                  if Check_Default then
                      Variable :=
                        Value_Of
                          (Name_Default_Language,
@@ -548,7 +564,7 @@ package body Prj.Conf is
                         Language_Htable.Set (Lang, Lang);
 
                      else
-                        --  If no language is declared, default to Ada
+                        --  If no default language is declared, default to Ada
 
                         Language_Htable.Set (Name_Ada, Name_Ada);
                      end if;
index cd200d4..561d793 100644 (file)
@@ -226,9 +226,18 @@ package body System.Tasking.Protected_Objects.Entries is
          raise Program_Error;
       end if;
 
-      Initialization.Defer_Abort (Self_ID);
+      --  If a PO is created from a controlled operation, abort is already
+      --  deferred at this point, so we need to use Defer_Abort_Nestable
+      --  In some cases, the below assertion can be useful to spot
+      --  inconsistencies, outside the above scenario involving controlled
+      --  types:
+
+      --  pragma Assert (Self_Id.Deferral_Level = 0);
+      --  Why is this commented out Assert here ???
+
+      Initialization.Defer_Abort_Nestable (Self_ID);
       Initialize_Lock (Init_Priority, Object.L'Access);
-      Initialization.Undefer_Abort (Self_ID);
+      Initialization.Undefer_Abort_Nestable (Self_ID);
 
       Object.Ceiling          := System.Any_Priority (Init_Priority);
       Object.New_Ceiling      := System.Any_Priority (Init_Priority);