+2017-09-12 Bob Duff <duff@adacore.com>
+
+ * sem_warn.adb: Minor comment.
+
+2017-09-12 Bob Duff <duff@adacore.com>
+
+ * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
+ libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
+ be Default_Initialized_Item, and apply pragma Unmodified to it,
+ to suppress the warning.
+
+2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
+ for access types.
+
+2017-09-12 Yannick Moy <moy@adacore.com>
+
+ * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
+ together with Global when ignoring one in CodePeer mode.
+
+2017-09-12 Javier Miranda <miranda@adacore.com>
+
+ * sem_ch3.adb (Analyze_Declarations): In nested
+ package declarations that have a private part enable missing check
+ of the RM rule 13.1.1(11/3): usage names in aspect definitions are
+ resolved at the end of the immediately enclosing declaration list.
+
2017-09-12 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
with Set_Targ;
with Sinfo; use Sinfo;
with Sinput.L; use Sinput.L;
-with Snames;
+with Snames; use Snames;
with Sprint; use Sprint;
with Stringt;
with Stylesw; use Stylesw;
Restrict.Restrictions.Set (Max_Asynchronous_Select_Nesting) := True;
Restrict.Restrictions.Value (Max_Asynchronous_Select_Nesting) := 0;
- -- Enable pragma Ignore_Pragma (Global) to support legacy code
+ -- Enable pragma Ignore_Pragma (Global) to support legacy code. As a
+ -- consequence, Refined_Global pragma should be ignored as well, as
+ -- it is only allowed on a body when pragma Global is given for the
+ -- spec.
- Set_Name_Table_Boolean3 (Name_Id'(Name_Find ("global")), True);
+ Set_Name_Table_Boolean3 (Name_Global, True);
+ Set_Name_Table_Boolean3 (Name_Refined_Global, True);
-- Suppress division by zero checks since they are handled
-- implicitly by CodePeer.
Count : Count_Type := 1)
is
pragma Warnings (Off);
- New_Item : Element_Type;
+ Default_Initialized_Item : Element_Type;
+ pragma Unmodified (Default_Initialized_Item);
-- OK to reference, see below. Note that we need to suppress both the
- -- front end warning and the back end warning.
+ -- front end warning and the back end warning. In addition, pragma
+ -- Unmodified is needed to suppress the warning ``actual type for
+ -- "Element_Type" should be fully initialized type'' on certain
+ -- instantiations.
begin
-- There is no explicit element provided, but in an instance the element
-- initialization, so insert the specified number of possibly
-- initialized elements at the given position.
- Insert (Container, Before, New_Item, Position, Count);
+ Insert (Container, Before, Default_Initialized_Item, Position, Count);
pragma Warnings (On);
end Insert;
-----------------
procedure Assign_Key (Node : in out Node_Type) is
- New_Item : Element_Type;
- pragma Unmodified (New_Item);
+ pragma Warnings (Off);
+ Default_Initialized_Item : Element_Type;
+ pragma Unmodified (Default_Initialized_Item);
-- Default-initialized element (ok to reference, see below)
begin
-- default initialization, so insert a possibly initialized element
-- under the given key.
- Node.Element := New_Item;
+ Node.Element := Default_Initialized_Item;
+ pragma Warnings (On);
end Assign_Key;
--------------
First : Count_Type;
Last : Count_Type;
- New_Item : Element_Type;
- pragma Unmodified (New_Item);
+ pragma Warnings (Off);
+ Default_Initialized_Item : Element_Type;
+ pragma Unmodified (Default_Initialized_Item);
-- OK to reference, see below
begin
-- initialization, so insert the specified number of possibly
-- initialized elements at the given position.
- Allocate_Node (Container, New_Item, First);
+ Allocate_Node (Container, Default_Initialized_Item, First);
Nodes (First).Parent := Parent.Node;
Last := First;
for J in Count_Type'(2) .. Count loop
- Allocate_Node (Container, New_Item, Nodes (Last).Next);
+ Allocate_Node
+ (Container, Default_Initialized_Item, Nodes (Last).Next);
Nodes (Nodes (Last).Next).Parent := Parent.Node;
Nodes (Nodes (Last).Next).Prev := Last;
Container.Count := Container.Count + Count;
Position := Cursor'(Parent.Container, First);
+ pragma Warnings (On);
end Insert_Child;
-------------------------
------------
procedure Assign (Node : in out Node_Type) is
- New_Item : Element_Type;
- pragma Unmodified (New_Item);
+ pragma Warnings (Off);
+ Default_Initialized_Item : Element_Type;
+ pragma Unmodified (Default_Initialized_Item);
-- Default-initialized element (ok to reference, see below)
begin
-- with such a scalar component or with defaulted components, so insert
-- possibly initialized elements at the given position.
- Node.Element := New_Item;
+ Node.Element := Default_Initialized_Item;
+ pragma Warnings (On);
end Assign;
--------------
and then not Is_Child_Unit (Current_Scope)
and then No (Generic_Parent (Parent (L)))
then
- -- This is needed in all cases to catch visibility errors in
- -- aspect expressions, but several large user tests are now
- -- rejected. Pending notification we restrict this call to
- -- ASIS mode.
+ -- ARM rule 13.1.1(11/3): usage names in aspect definitions are
+ -- resolved at the end of the immediately enclosing declaration
+ -- list (AI05-0183-1).
- if ASIS_Mode then
- Resolve_Aspects;
- end if;
+ Resolve_Aspects;
elsif L /= Visible_Declarations (Parent (L))
or else No (Private_Declarations (Parent (L)))
-- Note: use of OR instead of OR ELSE here is deliberate, we want
-- to mess with Unmodified flags on both body and spec entities.
+ -- Has_Unmodified has side effects!
return Has_Unmodified (E)
or