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.
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::
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
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
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
Count : Natural;
Result : Argument_List_Access;
+ Check_Default : Boolean;
+
begin
Prj_Iter := Project_Tree.Projects;
while Prj_Iter /= null loop
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,
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;
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);