+2014-01-21 Arnaud Charlet <charlet@adacore.com>
+
+ * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
+ call to Abort_Undefer, as expected by the runtime.
+ * s-tasren.adb (Local_Complete_Rendezvous): Replace
+ Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
+ deferred at this point. Update comments.
+
+2014-01-21 Thomas Quinot <quinot@adacore.com>
+
+ * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
+
+2014-01-21 Arnaud Charlet <charlet@adacore.com>
+
+ * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
+ remove from doc.
+
2014-01-21 Robert Dewar <dewar@adacore.com>
* switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
return;
end if;
- -- Suppress checks if the subtypes are the same. the check must be
+ -- Suppress checks if the subtypes are the same. The check must be
-- preserved in an assignment to a formal, because the constraint is
-- given by the actual.
-- the constraints are constants. In this case, we can do the check
-- successfully at compile time.
- -- We skip this check for the case where the node is rewritten`as
+ -- We skip this check for the case where the node is rewritten as
-- an allocator, because it already carries the context subtype,
-- and extracting the discriminants from the aggregate is messy.
begin
-- S_Typ may not have discriminants in the case where it is a
-- private type completed by a default discriminated type. In that
- -- case, we need to get the constraints from the underlying_type.
+ -- case, we need to get the constraints from the underlying type.
-- If the underlying type is unconstrained (i.e. has no default
-- discriminants) no check is needed.
-- [Deep_]Adjust (Temp.all);
-- We analyze by hand the new internal allocator to avoid any
- -- recursion and inappropriate call to Initialize
+ -- recursion and inappropriate call to Initialize.
-- We don't want to remove side effects when the expression must be
-- built in place. In the case of a build-in-place function call,
then
Insert_Action (N,
Make_Attach_Call (
- Obj_Ref =>
- New_Reference_To (Temp, Loc),
+ Obj_Ref => New_Reference_To (Temp, Loc),
Ptr_Typ => PtrT));
end if;
Set_Etype (Lhs, Lt);
end;
- -- If the Lhs has a private type with unknown discriminants, it
- -- may have a full view with discriminants, but those are nameable
- -- only in the underlying type, so convert the Rhs to it before
- -- potential checking. Convert Lhs as well, otherwise the actual
- -- subtype might not be constructible.
+ -- If the Lhs has a private type with unknown discriminants, it may
+ -- have a full view with discriminants, but those are nameable only
+ -- in the underlying type, so convert the Rhs to it before potential
+ -- checking. Convert Lhs as well, otherwise the actual subtype might
+ -- not be constructible.
elsif Has_Unknown_Discriminants (Base_Type (Etype (Lhs)))
and then Has_Discriminants (Typ)
if Present (Handled_Statement_Sequence (Accept_Statement (Alt))) then
Null_Body := New_Reference_To (Standard_False, Eloc);
- if Abort_Allowed then
- Call := Make_Procedure_Call_Statement (Eloc,
- Name => New_Reference_To (RTE (RE_Abort_Undefer), Eloc));
- Insert_Before (First (Statements (Handled_Statement_Sequence (
- Accept_Statement (Alt)))), Call);
- Analyze (Call);
- end if;
+ -- Always add call to Abort_Undefer, since this is what the
+ -- runtime expects (abort deferred in Selective_Wait).
+
+ Call :=
+ Make_Procedure_Call_Statement (Eloc,
+ Name => New_Reference_To (RTE (RE_Abort_Undefer), Eloc));
+ Insert_Before
+ (First (Statements (Handled_Statement_Sequence
+ (Accept_Statement (Alt)))),
+ Call);
+ Analyze (Call);
PB_Ent :=
Make_Defining_Identifier (Eloc,
manner). This can be useful in some specialized circumstances such as the
temporary use of special test software.
-@item -gnates=@var{path}
-@cindex @option{-gnates=file} (@command{gcc})
-Only relevant to the SPARK toolset (gnat2why), where gnatprove passes
-extra switches via a response file to gnat2why via this switch.
-This switch is otherwise ignored by gcc.
-
@item -gnateS
@cindex @option{-gnateS} (@command{gcc})
Synonym of @option{-fdump-scos}, kept for backwards compatibility.
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
-- --
-- GNARL 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- --
Send_Trace_Info (M_RDV_Complete, Entry_Call.Self);
end if;
- Initialization.Defer_Abort_Nestable (Self_Id);
+ Initialization.Defer_Abort (Self_Id);
elsif ZCX_By_Default then
-- With ZCX, aborts are not automatically deferred in handlers
- Initialization.Defer_Abort_Nestable (Self_Id);
+ Initialization.Defer_Abort (Self_Id);
end if;
-- We need to clean up any accepts which Self may have been serving when
Uninterpreted_Data := Self_Id.Common.Call.Uninterpreted_Data;
-- In this case the accept body is not Null_Body. Defer abort
- -- until it gets into the accept body.
+ -- until it gets into the accept body. The compiler has inserted
+ -- a call to Abort_Undefer as part of the entry expansion.
pragma Assert (Self_Id.Deferral_Level = 1);
Initialization.Defer_Abort_Nestable (Self_Id);
-- Leave abort deferred until the accept body
+ -- The compiler has inserted a call to Abort_Undefer as part of
+ -- the entry expansion.
end if;
STPO.Unlock (Self_Id);
-- We need an extra defer here, to keep abort
-- deferred until we get into the accept body
+ -- The compiler has inserted a call to Abort_Undefer as part
+ -- of the entry expansion.
Initialization.Defer_Abort_Nestable (Self_Id);
end if;
when 'P' =>
Treat_Categorization_Errors_As_Warnings := True;
- -- -gnateS (generate SCO information)
+ -- -gnates=file (specify extra file switches for gnat2why)
- -- Include Source Coverage Obligation information in ALI
- -- files for use by source coverage analysis tools (xcov).
+ -- This is an internal switch
when 's' =>
if not First_Switch then
return;
+ -- -gnateS (generate SCO information)
+
+ -- Include Source Coverage Obligation information in ALI
+ -- files for use by source coverage analysis tools (xcov).
+
when 'S' =>
Generate_SCO := True;
Generate_SCO_Instance_Table := True;
Write_Switch_Char ("eP");
Write_Line ("Pure/Prelaborate errors generate warnings rather than errors");
- -- Line for -gnates switch
-
- Write_Switch_Char ("es=?");
- Write_Line ("Specify extra switches for gnat2why");
+ -- No line for -gnates=? : internal switch
-- Line for -gnateS switch