+2015-10-23 Steve Baird <baird@adacore.com>
+
+ * a-cbdlli.ads, a-cbhama.ads, a-cbhase.ads, a-cbmutr.ads,
+ a-cborma.ads, a-cborse.ads, a-cbprqu.ads, a-cbsyqu.ads,
+ a-cdlili.ads, a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads,
+ a-cfinve.ads, a-cforma.ads, a-cforse.ads, a-cidlli.ads,
+ a-cihama.ads, a-cihase.ads, a-cimutr.ads, a-ciorma.ads,
+ a-ciormu.ads, a-ciorse.ads, a-coboho.ads, a-cobove.ads,
+ a-cofove.ads, a-cohama.ads, a-cohase.ads, a-coinho.ads,
+ a-coinho-shared.ads, a-coinve.ads, a-comutr.ads, a-conhel.ads,
+ a-convec.ads, a-coorma.ads, a-coormu.ads, a-coorse.ads,
+ a-cuprqu.ads, a-cusyqu.ads, a-rbtgbo.ads: Add spec Annotate
+ pragmas.
+ * a-cbdlli.adb, a-cbhama.adb, a-cbhase.adb, a-cbmutr.adb,
+ a-cborma.adb, a-cborse.adb, a-cbprqu.adb, a-cbsyqu.adb,
+ a-cdlili.adb, a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb,
+ a-cfinve.adb, a-cforma.adb, a-cforse.adb, a-cidlli.adb,
+ a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb,
+ a-ciormu.adb, a-ciorse.adb, a-coboho.adb, a-cobove.adb,
+ a-cofove.adb, a-cohama.adb, a-cohase.adb, a-coinho.adb,
+ a-coinho-shared.adb, a-coinve.adb, a-comutr.adb, a-conhel.adb,
+ a-convec.adb, a-coorma.adb, a-coormu.adb, a-coorse.adb,
+ a-cuprqu.adb, a-cusyqu.adb, a-rbtgbo.adb: Remove body Annotate
+ pragmas.
+
+2015-10-23 Vincent Celier <celier@adacore.com>
+
+ * gnatname.adb: When gnatname is invoked with a project file,
+ specified with switch -P, if gprname is available, gnatname will
+ invoke gprname, with the target if it is a cross gnatname.
+
+2015-10-23 Arnaud Charlet <charlet@adacore.com>
+
+ * exp_ch4.adb: Fix typo.
+ * exp_ch6.adb: Update comment.
+ * exp_attr.adb (Expand_Min_Max_Attribute): Simplify expansion.
+ * exp_aggr.adb (Convert_To_Positional): Only convert to
+ positional when generating C in case of an object declaration.
+ (In_Object_Declaration): New.
+ (Late_Expansion): Adapt to trees generated by Modify_Tree_For_C.
+ * sinfo.ads: Update documentation.
+
+2015-10-23 Joel Brobecker <brobecker@adacore.com brobecker>
+
+ * sigtramp.h (struct sigcontext, struct ucontext): Remove declarations,
+ and replace them by include of corresponding header file.
+
2015-10-23 Bob Duff <duff@adacore.com>
* a-convec.adb (Copy): Make sure C is initialized
package body Ada.Containers.Bounded_Doubly_Linked_Lists is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
return Boolean is <>;
package Ada.Containers.Bounded_Doubly_Linked_Lists is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Pure;
pragma Remote_Types;
package body Ada.Containers.Bounded_Hashed_Maps is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Bounded_Hashed_Maps is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Pure;
pragma Remote_Types;
package body Ada.Containers.Bounded_Hashed_Sets is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Bounded_Hashed_Sets is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Pure;
pragma Remote_Types;
package body Ada.Containers.Bounded_Multiway_Trees is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Bounded_Multiway_Trees is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Pure;
pragma Remote_Types;
package body Ada.Containers.Bounded_Ordered_Maps is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Bounded_Ordered_Maps is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Pure;
pragma Remote_Types;
package body Ada.Containers.Bounded_Ordered_Sets is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Bounded_Ordered_Sets is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Pure;
pragma Remote_Types;
-- --
-- B o d y --
-- --
--- Copyright (C) 2011-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2011-2015, Free Software Foundation, Inc. --
-- --
-- GNAT 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- --
package body Ada.Containers.Bounded_Priority_Queues is
- pragma Annotate (CodePeer, Skip_Analysis);
-
package body Implementation is
-------------
-- --
-- S p e c --
-- --
--- Copyright (C) 2011-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2011-2015, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
Default_Ceiling : System.Any_Priority := System.Priority'Last;
package Ada.Containers.Bounded_Priority_Queues is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
package Implementation is
-- --
-- B o d y --
-- --
--- Copyright (C) 2011-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2011-2015, Free Software Foundation, Inc. --
-- --
-- GNAT 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- --
package body Ada.Containers.Bounded_Synchronized_Queues is
- pragma Annotate (CodePeer, Skip_Analysis);
-
package body Implementation is
-------------
-- --
-- S p e c --
-- --
--- Copyright (C) 2011-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2011-2015, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
Default_Ceiling : System.Any_Priority := System.Priority'Last;
package Ada.Containers.Bounded_Synchronized_Queues is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
package Implementation is
package body Ada.Containers.Doubly_Linked_Lists is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
return Boolean is <>;
package Ada.Containers.Doubly_Linked_Lists is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Formal_Doubly_Linked_Lists with
SPARK_Mode => Off
is
- pragma Annotate (CodePeer, Skip_Analysis);
-----------------------
-- Local Subprograms --
SPARK_Mode
is
pragma Annotate (GNATprove, External_Axiomatization);
+ pragma Annotate (CodePeer, Skip_Analysis);
type List (Capacity : Count_Type) is private with
Iterable => (First => First,
-- --
-- B o d y --
-- --
--- Copyright (C) 2010-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2010-2015, Free Software Foundation, Inc. --
-- --
-- GNAT 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- --
package body Ada.Containers.Formal_Hashed_Maps with
SPARK_Mode => Off
is
- pragma Annotate (CodePeer, Skip_Analysis);
-----------------------
-- Local Subprograms --
SPARK_Mode
is
pragma Annotate (GNATprove, External_Axiomatization);
+ pragma Annotate (CodePeer, Skip_Analysis);
type Map (Capacity : Count_Type; Modulus : Hash_Type) is private with
Iterable => (First => First,
package body Ada.Containers.Formal_Hashed_Sets with
SPARK_Mode => Off
is
- pragma Annotate (CodePeer, Skip_Analysis);
-----------------------
-- Local Subprograms --
SPARK_Mode
is
pragma Annotate (GNATprove, External_Axiomatization);
+ pragma Annotate (CodePeer, Skip_Analysis);
type Set (Capacity : Count_Type; Modulus : Hash_Type) is private with
Iterable => (First => First,
package body Ada.Containers.Formal_Indefinite_Vectors with
SPARK_Mode => Off
is
- pragma Annotate (CodePeer, Skip_Analysis);
function H (New_Item : Element_Type) return Holder renames To_Holder;
function E (Container : Holder) return Element_Type renames Get;
SPARK_Mode => On
is
pragma Annotate (GNATprove, External_Axiomatization);
+ pragma Annotate (CodePeer, Skip_Analysis);
subtype Extended_Index is Index_Type'Base
range Index_Type'First - 1 ..
-- --
-- B o d y --
-- --
--- Copyright (C) 2010-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2010-2015, Free Software Foundation, Inc. --
-- --
-- GNAT 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- --
package body Ada.Containers.Formal_Ordered_Maps with
SPARK_Mode => Off
is
- pragma Annotate (CodePeer, Skip_Analysis);
-----------------------------
-- Node Access Subprograms --
SPARK_Mode
is
pragma Annotate (GNATprove, External_Axiomatization);
+ pragma Annotate (CodePeer, Skip_Analysis);
function Equivalent_Keys (Left, Right : Key_Type) return Boolean with
Global => null;
package body Ada.Containers.Formal_Ordered_Sets with
SPARK_Mode => Off
is
- pragma Annotate (CodePeer, Skip_Analysis);
------------------------------
-- Access to Fields of Node --
SPARK_Mode
is
pragma Annotate (GNATprove, External_Axiomatization);
+ pragma Annotate (CodePeer, Skip_Analysis);
function Equivalent_Elements (Left, Right : Element_Type) return Boolean
with
package body Ada.Containers.Indefinite_Doubly_Linked_Lists is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
return Boolean is <>;
package Ada.Containers.Indefinite_Doubly_Linked_Lists is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Indefinite_Hashed_Maps is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Indefinite_Hashed_Maps is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Indefinite_Hashed_Sets is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Indefinite_Hashed_Sets is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Indefinite_Multiway_Trees is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Indefinite_Multiway_Trees is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
with System; use type System.Address;
package body Ada.Containers.Indefinite_Ordered_Maps is
- pragma Annotate (CodePeer, Skip_Analysis);
pragma Suppress (All_Checks);
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Indefinite_Ordered_Maps is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Indefinite_Ordered_Multisets is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Indefinite_Ordered_Multisets is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Indefinite_Ordered_Sets is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Indefinite_Ordered_Sets is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Bounded_Holders is
- pragma Annotate (CodePeer, Skip_Analysis);
-
function Size_In_Storage_Elements (Element : Element_Type) return Natural;
-- This returns the size of Element in storage units. It raises an
-- exception if the size is not a multiple of Storage_Unit, or if the size
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Bounded_Holders is
+ pragma Annotate (CodePeer, Skip_Analysis);
+
-- This package is patterned after Ada.Containers.Indefinite_Holders. It is
-- used to treat indefinite subtypes as definite, but without using heap
-- allocation. For example, you might like to say:
package body Ada.Containers.Bounded_Vectors is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Bounded_Vectors is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Pure;
pragma Remote_Types;
package body Ada.Containers.Formal_Vectors with
SPARK_Mode => Off
is
- pragma Annotate (CodePeer, Skip_Analysis);
Growth_Factor : constant := 2;
-- When growing a container, multiply current capacity by this. Doubling
SPARK_Mode
is
pragma Annotate (GNATprove, External_Axiomatization);
+ pragma Annotate (CodePeer, Skip_Analysis);
subtype Extended_Index is Index_Type'Base
range Index_Type'First - 1 ..
package body Ada.Containers.Hashed_Maps is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Hashed_Maps is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Hashed_Sets is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Hashed_Sets is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Indefinite_Holders is
- pragma Annotate (CodePeer, Skip_Analysis);
-
procedure Free is
new Ada.Unchecked_Deallocation (Element_Type, Element_Access);
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Indefinite_Holders is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate (Indefinite_Holders);
pragma Remote_Types (Indefinite_Holders);
-- --
-- B o d y --
-- --
--- Copyright (C) 2012-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2012-2015, Free Software Foundation, Inc. --
-- --
-- GNAT 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- --
package body Ada.Containers.Indefinite_Holders is
- pragma Annotate (CodePeer, Skip_Analysis);
-
procedure Free is
new Ada.Unchecked_Deallocation (Element_Type, Element_Access);
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Indefinite_Holders is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate (Indefinite_Holders);
pragma Remote_Types (Indefinite_Holders);
package body Ada.Containers.Indefinite_Vectors is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Indefinite_Vectors is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Multiway_Trees is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Multiway_Trees is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Generic_Implementation is
- pragma Annotate (CodePeer, Skip_Analysis);
-
use type SAC.Atomic_Unsigned;
------------
with System.Atomic_Counters;
package Ada.Containers.Helpers is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Pure;
-- Miscellaneous helpers shared among various containers
package body Ada.Containers.Vectors is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Vectors is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Ordered_Maps is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Ordered_Maps is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Ordered_Multisets is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Ordered_Multisets is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
package body Ada.Containers.Ordered_Sets is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Ordered_Sets is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;
-- --
-- B o d y --
-- --
--- Copyright (C) 2011-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2011-2015, Free Software Foundation, Inc. --
-- --
-- GNAT 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- --
package body Ada.Containers.Unbounded_Priority_Queues is
- pragma Annotate (CodePeer, Skip_Analysis);
-
package body Implementation is
-----------------------
-- --
-- S p e c --
-- --
--- Copyright (C) 2011-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2011-2015, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
Default_Ceiling : System.Any_Priority := System.Priority'Last;
package Ada.Containers.Unbounded_Priority_Queues is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
package Implementation is
-- --
-- B o d y --
-- --
--- Copyright (C) 2011-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2011-2015, Free Software Foundation, Inc. --
-- --
-- GNAT 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- --
package body Ada.Containers.Unbounded_Synchronized_Queues is
- pragma Annotate (CodePeer, Skip_Analysis);
-
package body Implementation is
-----------------------
-- --
-- S p e c --
-- --
--- Copyright (C) 2011-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2011-2015, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
Default_Ceiling : System.Any_Priority := System.Priority'Last;
package Ada.Containers.Unbounded_Synchronized_Queues is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
package Implementation is
package body Ada.Containers.Red_Black_Trees.Generic_Bounded_Operations is
- pragma Annotate (CodePeer, Skip_Analysis);
-
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
Color : Color_Type) is <>;
package Ada.Containers.Red_Black_Trees.Generic_Bounded_Operations is
+ pragma Annotate (CodePeer, Skip_Analysis);
pragma Pure;
function Min (Tree : Tree_Type'Class; Node : Count_Type) return Count_Type;
-- N is an aggregate (record or array). Checks the presence of default
-- initialization (<>) in any component (Ada 2005: AI-287).
+ function In_Object_Declaration (N : Node_Id) return Boolean;
+ -- Return True if N is part of an object declaration, False otherwise
+
function Is_Static_Dispatch_Table_Aggregate (N : Node_Id) return Boolean;
-- Returns true if N is an aggregate used to initialize the components
-- of a statically allocated dispatch table.
-- Start of processing for Convert_To_Positional
begin
+ -- Only convert to positional when generating C in case of an
+ -- object declaration, this is the only case where aggregates are
+ -- supported in C.
+
+ if Modify_Tree_For_C and then not In_Object_Declaration (N) then
+ return;
+ end if;
+
-- Ada 2005 (AI-287): Do not convert in case of default initialized
-- components because in this case will need to call the corresponding
-- IP procedure.
elsif Type_May_Have_Bit_Aligned_Components (Typ) then
Convert_To_Assignments (N, Typ);
+ -- When generating C, only generate an aggregate when declaring objects
+ -- since C does not support aggregates in e.g. assignment statements.
+
+ elsif Modify_Tree_For_C and then not In_Object_Declaration (N) then
+ Convert_To_Assignments (N, Typ);
+
-- In all other cases, build a proper aggregate to be handled by gigi
else
end if;
end Is_Delayed_Aggregate;
+ ---------------------------
+ -- In_Object_Declaration --
+ ---------------------------
+
+ function In_Object_Declaration (N : Node_Id) return Boolean is
+ P : Node_Id := Parent (N);
+ begin
+ while Present (P) loop
+ if Nkind (P) = N_Object_Declaration then
+ return True;
+ end if;
+
+ P := Parent (P);
+ end loop;
+
+ return False;
+ end In_Object_Declaration;
+
----------------------------------------
-- Is_Static_Dispatch_Table_Aggregate --
----------------------------------------
Aggr_Code : List_Id;
begin
- if Is_Record_Type (Etype (N)) then
- Aggr_Code := Build_Record_Aggr_Code (N, Typ, Target);
-
- else pragma Assert (Is_Array_Type (Etype (N)));
+ if Is_Array_Type (Etype (N)) then
Aggr_Code :=
Build_Array_Aggr_Code
(N => N,
Into => Target,
Scalar_Comp => Is_Scalar_Type (Component_Type (Typ)),
Indexes => No_List);
+ else
+ -- Directly or indirectly (e.g. access protected procedure) a record
+
+ Aggr_Code := Build_Record_Aggr_Code (N, Typ, Target);
end if;
-- Save the last assignment statement associated with the aggregate
Duplicate_Subexpr_No_Checks (Left),
Duplicate_Subexpr_No_Checks (Right))));
- -- Otherwise we generate declarations to capture the values. We
- -- can't put these declarations inside the if expression, since
- -- we could end up with an N_Expression_With_Actions which has
- -- declarations in the actions, forbidden for Modify_Tree_For_C.
+ -- Otherwise we generate declarations to capture the values.
-- The translation is
- -- T1 : styp; -- inserted high up in tree
- -- T2 : styp; -- inserted high up in tree
-
-- do
- -- T1 := styp!(Left);
- -- T2 := styp!(Right);
+ -- T1 : constant typ := Left;
+ -- T2 : constant typ := Right;
-- in
- -- (if T1 >=|<= T2 then typ!(T1) else typ!(T2))
+ -- (if T1 >=|<= T2 then T1 else T2)
-- end;
- -- We insert the T1,T2 declarations with Insert_Declaration which
- -- inserts these declarations high up in the tree unconditionally.
- -- This is safe since no code is associated with the declarations.
- -- Here styp is a standard type whose Esize matches the size of
- -- our type. We do this because the actual type may be a result of
- -- some local declaration which would not be visible at the point
- -- where we insert the declarations of T1 and T2.
-
else
declare
- T1 : constant Entity_Id := Make_Temporary (Loc, 'T', Left);
- T2 : constant Entity_Id := Make_Temporary (Loc, 'T', Left);
- Styp : constant Entity_Id := Matching_Standard_Type (Typ);
-
+ T1 : constant Entity_Id := Make_Temporary (Loc, 'T', Left);
+ T2 : constant Entity_Id := Make_Temporary (Loc, 'T', Right);
begin
- Insert_Declaration (N,
- Make_Object_Declaration (Loc,
- Defining_Identifier => T1,
- Object_Definition => New_Occurrence_Of (Styp, Loc)));
-
- Insert_Declaration (N,
- Make_Object_Declaration (Loc,
- Defining_Identifier => T2,
- Object_Definition => New_Occurrence_Of (Styp, Loc)));
-
Rewrite (N,
Make_Expression_With_Actions (Loc,
Actions => New_List (
- Make_Assignment_Statement (Loc,
- Name => New_Occurrence_Of (T1, Loc),
- Expression => Unchecked_Convert_To (Styp, Left)),
- Make_Assignment_Statement (Loc,
- Name => New_Occurrence_Of (T2, Loc),
- Expression => Unchecked_Convert_To (Styp, Right))),
-
+ Make_Object_Declaration (Loc,
+ Defining_Identifier => T1,
+ Object_Definition =>
+ New_Occurrence_Of (Etype (Left), Loc),
+ Constant_Present => True,
+ Expression => Relocate_Node (Left)),
+ Make_Object_Declaration (Loc,
+ Defining_Identifier => T2,
+ Object_Definition =>
+ New_Occurrence_Of (Etype (Right), Loc),
+ Constant_Present => True,
+ Expression => Relocate_Node (Right))),
Expression =>
Make_If_Expression (Loc,
Expressions => New_List (
Make_Compare
(New_Occurrence_Of (T1, Loc),
New_Occurrence_Of (T2, Loc)),
- Unchecked_Convert_To (Typ,
- New_Occurrence_Of (T1, Loc)),
- Unchecked_Convert_To (Typ,
- New_Occurrence_Of (T2, Loc))))));
+ New_Occurrence_Of (T1, Loc),
+ New_Occurrence_Of (T2, Loc)))));
end;
end if;
elsif Is_Boolean_Type (Etype (Expression (N))) then
Force_Boolean_Evaluation (Expression (N));
- -- The expression of an expression_with_actions node may not necessarely
+ -- The expression of an expression_with_actions node may not necessarily
-- be Boolean when the node appears in an if expression. In this case do
-- the usual forced evaluation to encapsulate potential aliasing.
-- Tnnn;
-- end;
- -- Note: this won't do in Modify_Tree_For_C mode, but we
- -- will deal with that later (it will require creating a
- -- declaration for Temp, using Insert_Declaration) ???
-
declare
Tnnn : constant Entity_Id := Make_Temporary (Loc, 'T');
FRTyp : constant Entity_Id := Etype (N);
Usage;
end if;
+ if Create_Project then
+ declare
+ Gnatname : constant String_Access :=
+ Program_Name ("gnatname", "gnatname");
+ Target : String_Access := null;
+ Arg_Len : Positive := Argument_Count;
+
+ begin
+ -- Find the target, if any
+
+ if Gnatname.all /= "gnatname" then
+ Target := new String'(Gnatname
+ (Gnatname'First .. Gnatname'Last - 9));
+ Arg_Len := Arg_Len + 1;
+ end if;
+
+ declare
+ Gprname : String_Access :=
+ Locate_Exec_On_Path (Exec_Name => "gprname");
+ Args : Argument_List (1 .. Arg_Len);
+ Success : Boolean;
+
+ begin
+ if Gprname /= null then
+ for J in 1 .. Argument_Count loop
+ Args (J) := new String'(Argument (J));
+ end loop;
+
+ -- Add the target if there is one
+
+ if Target /= null then
+ Args (Args'Last) :=
+ new String'("--target=" & Target.all);
+ end if;
+
+ Spawn (Gprname.all, Args, Success);
+
+ Free (Gprname);
+
+ if Success then
+ Exit_Program (E_Success);
+ end if;
+ end if;
+ end;
+ end;
+ end if;
+
+ if Create_Project then
+ -- This only happens if gprname is not found or if the invocation of
+ -- gprname did not succeed.
+
+ Write_Line
+ ("warning: gnatname -P is obsolete and will not be available "
+ & "in the next release; use gprname instead");
+ end if;
+
-- If no Ada or foreign pattern was specified, print the usage and return
if Patterns.Last (Arguments.Table (Arguments.Last).Name_Patterns) = 0
#ifdef __ANDROID__
#include <stdlib.h>
-#include <asm/signal.h>
-#include <asm/sigcontext.h>
-
-/* Android SDK doesn't define these structs */
-typedef struct sigcontext mcontext_t;
-
-typedef struct ucontext
- {
- unsigned long uc_flags;
- struct ucontext *uc_link;
- stack_t uc_stack;
- mcontext_t uc_mcontext;
-} ucontext_t;
+#include <sys/ucontext.h>
#endif
/* This typedef signature sometimes conflicts with the sighandler_t from
-- Mod for signed integer types is expanded into equivalent expressions
-- using Rem (which is % in C) and other C-available operators.
- -- The Actions list of an Expression_With_Actions node does not contain
- -- any declarations,(so that DO X, .. Y IN Z becomes (X, .. Y, Z) in C).
+ -- Functions returning bounded arrays are transformed into procedures
+ -- with an extra out parameter, and the calls updated accordingly.
+
+ -- Aggregates are only kept unexpanded for object declarations, otherwise
+ -- they are systematically expanded into loops (for arrays) and
+ -- individual assignments (for records).
------------------------------------
-- Description of Semantic Fields --