From: Arnaud Charlet Date: Tue, 26 Jan 2010 09:56:25 +0000 (+0100) Subject: [multiple changes] X-Git-Tag: releases/gcc-4.5.0~1061 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a1054884e248ff337bb8958e1889b90c192f22d;p=thirdparty%2Fgcc.git [multiple changes] 2010-01-26 Vincent Celier * gnat_ugn.texi: Complete documentation on the restrictions for combined options in -gnatxxx switches. Fix typo. 2010-01-26 Arnaud Charlet * 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 * prj-conf.adb (Get_Config_Switches): Check for a default language for a project extending a project with no languages. From-SVN: r156237 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9c17576506a1..3884aa43626a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,20 @@ +2010-01-26 Vincent Celier + + * gnat_ugn.texi: Complete documentation on the restrictions for + combined options in -gnatxxx switches. + Fix typo. + +2010-01-26 Arnaud Charlet + + * 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 + + * 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 * switch-c.adb (Scan_Front_End_Switches): Take into account options diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 42e3b91fdb49..7cb31f26460a 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 30823a3862da..dfebd9a5d490 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 cd200d4e5961..561d79306c7e 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);