aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-01-26 10:56:25 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2010-01-26 10:56:25 +0100
commit1a1054884e248ff337bb8958e1889b90c192f22d (patch)
tree39d4362ce79e1cff512ceb6da7520b7144968011
parent057dd91d0c1df52679f71644d95fea2ae9522f3e (diff)
downloadgcc-1a1054884e248ff337bb8958e1889b90c192f22d.zip
gcc-1a1054884e248ff337bb8958e1889b90c192f22d.tar.gz
gcc-1a1054884e248ff337bb8958e1889b90c192f22d.tar.bz2
[multiple changes]
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
-rw-r--r--gcc/ada/ChangeLog17
-rw-r--r--gcc/ada/gnat_ugn.texi16
-rw-r--r--gcc/ada/prj-conf.adb22
-rw-r--r--gcc/ada/s-tpoben.adb13
4 files changed, 57 insertions, 11 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 9c17576..3884aa4 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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.
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 42e3b91..7cb31f2 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -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
diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb
index 30823a3..dfebd9a 100644
--- a/gcc/ada/prj-conf.adb
+++ b/gcc/ada/prj-conf.adb
@@ -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;
diff --git a/gcc/ada/s-tpoben.adb b/gcc/ada/s-tpoben.adb
index cd200d4..561d793 100644
--- a/gcc/ada/s-tpoben.adb
+++ b/gcc/ada/s-tpoben.adb
@@ -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);