[multiple changes]

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.

From-SVN: r229243
This commit is contained in:
Arnaud Charlet 2015-10-23 14:37:35 +02:00
parent d742bfc009
commit 6031f544dd
86 changed files with 222 additions and 148 deletions

View File

@ -1,3 +1,50 @@
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

View File

@ -31,8 +31,6 @@ with System; use type System.Address;
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

View File

@ -44,6 +44,7 @@ generic
return Boolean is <>;
package Ada.Containers.Bounded_Doubly_Linked_Lists is
pragma Annotate (CodePeer, Skip_Analysis);
pragma Pure;
pragma Remote_Types;

View File

@ -41,8 +41,6 @@ with System; use type System.Address;
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

View File

@ -46,6 +46,7 @@ generic
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;

View File

@ -41,8 +41,6 @@ with System; use type System.Address;
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

View File

@ -49,6 +49,7 @@ generic
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;

View File

@ -32,8 +32,6 @@ with System; use type System.Address;
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

View File

@ -42,6 +42,7 @@ generic
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;

View File

@ -41,8 +41,6 @@ with System; use type System.Address;
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

View File

@ -45,6 +45,7 @@ generic
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;

View File

@ -44,8 +44,6 @@ with System; use type System.Address;
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

View File

@ -45,6 +45,7 @@ generic
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;

View File

@ -6,7 +6,7 @@
-- --
-- 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- --
@ -29,8 +29,6 @@
package body Ada.Containers.Bounded_Priority_Queues is
pragma Annotate (CodePeer, Skip_Analysis);
package body Implementation is
-------------

View File

@ -6,7 +6,7 @@
-- --
-- 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 --
@ -52,6 +52,7 @@ generic
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

View File

@ -6,7 +6,7 @@
-- --
-- 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- --
@ -29,8 +29,6 @@
package body Ada.Containers.Bounded_Synchronized_Queues is
pragma Annotate (CodePeer, Skip_Analysis);
package body Implementation is
-------------

View File

@ -6,7 +6,7 @@
-- --
-- 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 --
@ -42,6 +42,7 @@ generic
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

View File

@ -33,8 +33,6 @@ with System; use type System.Address;
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

View File

@ -44,6 +44,7 @@ generic
return Boolean is <>;
package Ada.Containers.Doubly_Linked_Lists is
pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;

View File

@ -30,7 +30,6 @@ with System; use type System.Address;
package body Ada.Containers.Formal_Doubly_Linked_Lists with
SPARK_Mode => Off
is
pragma Annotate (CodePeer, Skip_Analysis);
-----------------------
-- Local Subprograms --

View File

@ -66,6 +66,7 @@ package Ada.Containers.Formal_Doubly_Linked_Lists with
SPARK_Mode
is
pragma Annotate (GNATprove, External_Axiomatization);
pragma Annotate (CodePeer, Skip_Analysis);
type List (Capacity : Count_Type) is private with
Iterable => (First => First,

View File

@ -6,7 +6,7 @@
-- --
-- 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- --
@ -38,7 +38,6 @@ with System; use type System.Address;
package body Ada.Containers.Formal_Hashed_Maps with
SPARK_Mode => Off
is
pragma Annotate (CodePeer, Skip_Analysis);
-----------------------
-- Local Subprograms --

View File

@ -70,6 +70,7 @@ package Ada.Containers.Formal_Hashed_Maps with
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,

View File

@ -38,7 +38,6 @@ with System; use type System.Address;
package body Ada.Containers.Formal_Hashed_Sets with
SPARK_Mode => Off
is
pragma Annotate (CodePeer, Skip_Analysis);
-----------------------
-- Local Subprograms --

View File

@ -72,6 +72,7 @@ package Ada.Containers.Formal_Hashed_Sets with
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,

View File

@ -28,7 +28,6 @@
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;

View File

@ -59,6 +59,7 @@ package Ada.Containers.Formal_Indefinite_Vectors with
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 ..

View File

@ -6,7 +6,7 @@
-- --
-- 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- --
@ -37,7 +37,6 @@ with System; use type System.Address;
package body Ada.Containers.Formal_Ordered_Maps with
SPARK_Mode => Off
is
pragma Annotate (CodePeer, Skip_Analysis);
-----------------------------
-- Node Access Subprograms --

View File

@ -71,6 +71,7 @@ package Ada.Containers.Formal_Ordered_Maps with
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;

View File

@ -41,7 +41,6 @@ with System; use type System.Address;
package body Ada.Containers.Formal_Ordered_Sets with
SPARK_Mode => Off
is
pragma Annotate (CodePeer, Skip_Analysis);
------------------------------
-- Access to Fields of Node --

View File

@ -69,6 +69,7 @@ package Ada.Containers.Formal_Ordered_Sets with
SPARK_Mode
is
pragma Annotate (GNATprove, External_Axiomatization);
pragma Annotate (CodePeer, Skip_Analysis);
function Equivalent_Elements (Left, Right : Element_Type) return Boolean
with

View File

@ -33,8 +33,6 @@ with System; use type System.Address;
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

View File

@ -44,6 +44,7 @@ generic
return Boolean is <>;
package Ada.Containers.Indefinite_Doubly_Linked_Lists is
pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;

View File

@ -41,8 +41,6 @@ with System; use type System.Address;
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

View File

@ -46,6 +46,7 @@ generic
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;

View File

@ -43,8 +43,6 @@ with System; use type System.Address;
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

View File

@ -49,6 +49,7 @@ generic
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;

View File

@ -33,8 +33,6 @@ with System; use type System.Address;
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

View File

@ -43,6 +43,7 @@ generic
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;

View File

@ -40,7 +40,6 @@ pragma Elaborate_All (Ada.Containers.Red_Black_Trees.Generic_Keys);
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");

View File

@ -45,6 +45,7 @@ generic
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;

View File

@ -42,8 +42,6 @@ with System; use type System.Address;
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

View File

@ -44,6 +44,7 @@ generic
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;

View File

@ -44,8 +44,6 @@ with System; use type System.Address;
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

View File

@ -45,6 +45,7 @@ generic
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;

View File

@ -29,8 +29,6 @@ with Unchecked_Conversion;
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

View File

@ -38,6 +38,8 @@ generic
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:

View File

@ -33,8 +33,6 @@ with System; use type System.Address;
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

View File

@ -44,6 +44,7 @@ generic
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;

View File

@ -33,7 +33,6 @@ with System; use type System.Address;
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

View File

@ -50,6 +50,7 @@ package Ada.Containers.Formal_Vectors with
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 ..

View File

@ -41,8 +41,6 @@ with System; use type System.Address;
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

View File

@ -46,6 +46,7 @@ generic
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;

View File

@ -43,8 +43,6 @@ with System; use type System.Address;
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

View File

@ -49,6 +49,7 @@ generic
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;

View File

@ -36,8 +36,6 @@ with Ada.Unchecked_Deallocation;
package body Ada.Containers.Indefinite_Holders is
pragma Annotate (CodePeer, Skip_Analysis);
procedure Free is
new Ada.Unchecked_Deallocation (Element_Type, Element_Access);

View File

@ -42,6 +42,7 @@ generic
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);

View File

@ -6,7 +6,7 @@
-- --
-- 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- --
@ -29,8 +29,6 @@ with Ada.Unchecked_Deallocation;
package body Ada.Containers.Indefinite_Holders is
pragma Annotate (CodePeer, Skip_Analysis);
procedure Free is
new Ada.Unchecked_Deallocation (Element_Type, Element_Access);

View File

@ -37,6 +37,7 @@ generic
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);

View File

@ -34,8 +34,6 @@ with System; use type System.Address;
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

View File

@ -44,6 +44,7 @@ generic
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;

View File

@ -34,8 +34,6 @@ with System; use type System.Address;
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

View File

@ -43,6 +43,7 @@ generic
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;

View File

@ -29,8 +29,6 @@ package body Ada.Containers.Helpers is
package body Generic_Implementation is
pragma Annotate (CodePeer, Skip_Analysis);
use type SAC.Atomic_Unsigned;
------------

View File

@ -29,6 +29,7 @@ with Ada.Finalization;
with System.Atomic_Counters;
package Ada.Containers.Helpers is
pragma Annotate (CodePeer, Skip_Analysis);
pragma Pure;
-- Miscellaneous helpers shared among various containers

View File

@ -34,8 +34,6 @@ with System; use type System.Address;
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

View File

@ -44,6 +44,7 @@ generic
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Vectors is
pragma Annotate (CodePeer, Skip_Analysis);
pragma Preelaborate;
pragma Remote_Types;

View File

@ -41,8 +41,6 @@ with System; use type System.Address;
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

View File

@ -45,6 +45,7 @@ generic
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;

View File

@ -42,8 +42,6 @@ with System; use type System.Address;
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

View File

@ -43,6 +43,7 @@ generic
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;

View File

@ -44,8 +44,6 @@ with System; use type System.Address;
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

View File

@ -45,6 +45,7 @@ generic
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;

View File

@ -6,7 +6,7 @@
-- --
-- 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- --
@ -31,8 +31,6 @@ with Ada.Unchecked_Deallocation;
package body Ada.Containers.Unbounded_Priority_Queues is
pragma Annotate (CodePeer, Skip_Analysis);
package body Implementation is
-----------------------

View File

@ -6,7 +6,7 @@
-- --
-- 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 --
@ -50,6 +50,7 @@ generic
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

View File

@ -6,7 +6,7 @@
-- --
-- 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- --
@ -31,8 +31,6 @@ with Ada.Unchecked_Deallocation;
package body Ada.Containers.Unbounded_Synchronized_Queues is
pragma Annotate (CodePeer, Skip_Analysis);
package body Implementation is
-----------------------

View File

@ -6,7 +6,7 @@
-- --
-- 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 --
@ -42,6 +42,7 @@ generic
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

View File

@ -39,8 +39,6 @@ with System; use type System.Address;
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

View File

@ -61,6 +61,7 @@ generic
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;

View File

@ -88,6 +88,9 @@ package body Exp_Aggr is
-- 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.
@ -3897,6 +3900,14 @@ package body Exp_Aggr is
-- 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.
@ -6038,6 +6049,12 @@ package body Exp_Aggr is
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
@ -6408,6 +6425,24 @@ package body Exp_Aggr is
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 --
----------------------------------------
@ -6465,10 +6500,7 @@ package body Exp_Aggr is
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,
@ -6477,6 +6509,10 @@ package body Exp_Aggr is
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

View File

@ -1458,68 +1458,45 @@ package body Exp_Attr is
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;

View File

@ -5165,7 +5165,7 @@ package body Exp_Ch4 is
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.

View File

@ -1990,10 +1990,6 @@ package body Exp_Ch6 is
-- 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);

View File

@ -609,6 +609,62 @@ begin
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

View File

@ -43,19 +43,7 @@ extern "C" {
#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

View File

@ -728,8 +728,12 @@ package Sinfo is
-- 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 --