+2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * exp_disp.adb (Make_Disp_Asynchronous_Select_Spec): Set
+ Warnings_Off on the B out parameter.
+
2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads: Small comment fix.
(Typ : Entity_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (Typ);
- Def_Id : constant Node_Id :=
+ Def_Id : constant Entity_Id :=
Make_Defining_Identifier (Loc,
Name_uDisp_Asynchronous_Select);
+ B_Id : constant Entity_Id := Make_Defining_Identifier (Loc, Name_uB);
Params : constant List_Id := New_List;
begin
-- B : out Dummy_Communication_Block; -- Communication block dummy
-- F : out Boolean; -- Status flag
+ -- The B parameter may be left uninitialized
+ Set_Warnings_Off (B_Id);
+
Append_List_To (Params, New_List (
Make_Parameter_Specification (Loc,
Parameter_Type => New_Occurrence_Of (RTE (RE_Address), Loc)),
Make_Parameter_Specification (Loc,
- Defining_Identifier => Make_Defining_Identifier (Loc, Name_uB),
+ Defining_Identifier => B_Id,
Parameter_Type =>
New_Occurrence_Of (RTE (RE_Dummy_Communication_Block), Loc),
Out_Present => True),
+2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/warn17.adb: New testcase.
+
2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/inline14.adb, gnat.dg/inline14_pkg.adb,
--- /dev/null
+-- { dg-do compile }
+-- { dg-options "-Wall" }
+
+with Ada.Iterator_Interfaces;
+
+procedure Warn17 is
+
+ type Cursor is null record;
+
+ function Has_Element (Position : Cursor) return Boolean;
+
+ function Has_Element (Position : Cursor) return Boolean is (True);
+
+ package My_Iterator is
+ new Ada.Iterator_Interfaces (Cursor, Has_Element);
+
+ type Iterator is abstract new My_Iterator.Forward_Iterator with null record;
+
+ pragma Unreferenced (Iterator);
+begin
+ null;
+end Warn17;