diff options
86 files changed, 222 insertions, 148 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e17fa0c..7d6f607 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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 diff --git a/gcc/ada/a-cbdlli.adb b/gcc/ada/a-cbdlli.adb index 14aad94..c279943 100644 --- a/gcc/ada/a-cbdlli.adb +++ b/gcc/ada/a-cbdlli.adb @@ -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 diff --git a/gcc/ada/a-cbdlli.ads b/gcc/ada/a-cbdlli.ads index f09c3ed..8489153 100644 --- a/gcc/ada/a-cbdlli.ads +++ b/gcc/ada/a-cbdlli.ads @@ -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; diff --git a/gcc/ada/a-cbhama.adb b/gcc/ada/a-cbhama.adb index 6d4bc55..86c57e7 100644 --- a/gcc/ada/a-cbhama.adb +++ b/gcc/ada/a-cbhama.adb @@ -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 diff --git a/gcc/ada/a-cbhama.ads b/gcc/ada/a-cbhama.ads index 1514fb8..0bab22e 100644 --- a/gcc/ada/a-cbhama.ads +++ b/gcc/ada/a-cbhama.ads @@ -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; diff --git a/gcc/ada/a-cbhase.adb b/gcc/ada/a-cbhase.adb index d75ac48..59b0bdb 100644 --- a/gcc/ada/a-cbhase.adb +++ b/gcc/ada/a-cbhase.adb @@ -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 diff --git a/gcc/ada/a-cbhase.ads b/gcc/ada/a-cbhase.ads index 87e35ca..1023fc5 100644 --- a/gcc/ada/a-cbhase.ads +++ b/gcc/ada/a-cbhase.ads @@ -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; diff --git a/gcc/ada/a-cbmutr.adb b/gcc/ada/a-cbmutr.adb index 24db4d4..3fe986d 100644 --- a/gcc/ada/a-cbmutr.adb +++ b/gcc/ada/a-cbmutr.adb @@ -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 diff --git a/gcc/ada/a-cbmutr.ads b/gcc/ada/a-cbmutr.ads index fd8c206..6600197 100644 --- a/gcc/ada/a-cbmutr.ads +++ b/gcc/ada/a-cbmutr.ads @@ -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; diff --git a/gcc/ada/a-cborma.adb b/gcc/ada/a-cborma.adb index c9f1130..611e895 100644 --- a/gcc/ada/a-cborma.adb +++ b/gcc/ada/a-cborma.adb @@ -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 diff --git a/gcc/ada/a-cborma.ads b/gcc/ada/a-cborma.ads index 2b68bbf..7aa6e6c 100644 --- a/gcc/ada/a-cborma.ads +++ b/gcc/ada/a-cborma.ads @@ -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; diff --git a/gcc/ada/a-cborse.adb b/gcc/ada/a-cborse.adb index 84c7149..85d6566 100644 --- a/gcc/ada/a-cborse.adb +++ b/gcc/ada/a-cborse.adb @@ -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 diff --git a/gcc/ada/a-cborse.ads b/gcc/ada/a-cborse.ads index 7d76f78..f342ab8 100644 --- a/gcc/ada/a-cborse.ads +++ b/gcc/ada/a-cborse.ads @@ -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; diff --git a/gcc/ada/a-cbprqu.adb b/gcc/ada/a-cbprqu.adb index 61b9e72..8256d86 100644 --- a/gcc/ada/a-cbprqu.adb +++ b/gcc/ada/a-cbprqu.adb @@ -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 ------------- diff --git a/gcc/ada/a-cbprqu.ads b/gcc/ada/a-cbprqu.ads index fb44d02..932e607 100644 --- a/gcc/ada/a-cbprqu.ads +++ b/gcc/ada/a-cbprqu.ads @@ -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 diff --git a/gcc/ada/a-cbsyqu.adb b/gcc/ada/a-cbsyqu.adb index e918a9a..0f29d9f 100644 --- a/gcc/ada/a-cbsyqu.adb +++ b/gcc/ada/a-cbsyqu.adb @@ -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 ------------- diff --git a/gcc/ada/a-cbsyqu.ads b/gcc/ada/a-cbsyqu.ads index 9084639..e22e082 100644 --- a/gcc/ada/a-cbsyqu.ads +++ b/gcc/ada/a-cbsyqu.ads @@ -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 diff --git a/gcc/ada/a-cdlili.adb b/gcc/ada/a-cdlili.adb index 036f0aba..011c395 100644 --- a/gcc/ada/a-cdlili.adb +++ b/gcc/ada/a-cdlili.adb @@ -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 diff --git a/gcc/ada/a-cdlili.ads b/gcc/ada/a-cdlili.ads index abc6de7..a1bc17cb 100644 --- a/gcc/ada/a-cdlili.ads +++ b/gcc/ada/a-cdlili.ads @@ -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; diff --git a/gcc/ada/a-cfdlli.adb b/gcc/ada/a-cfdlli.adb index 7b19dd6..6fed4cc 100644 --- a/gcc/ada/a-cfdlli.adb +++ b/gcc/ada/a-cfdlli.adb @@ -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 -- diff --git a/gcc/ada/a-cfdlli.ads b/gcc/ada/a-cfdlli.ads index e0b96a3..36e1869 100644 --- a/gcc/ada/a-cfdlli.ads +++ b/gcc/ada/a-cfdlli.ads @@ -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, diff --git a/gcc/ada/a-cfhama.adb b/gcc/ada/a-cfhama.adb index 11dbc6f..7fd9b7f 100644 --- a/gcc/ada/a-cfhama.adb +++ b/gcc/ada/a-cfhama.adb @@ -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 -- diff --git a/gcc/ada/a-cfhama.ads b/gcc/ada/a-cfhama.ads index fd94b1b..8d6e96a 100644 --- a/gcc/ada/a-cfhama.ads +++ b/gcc/ada/a-cfhama.ads @@ -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, diff --git a/gcc/ada/a-cfhase.adb b/gcc/ada/a-cfhase.adb index d25705b..cc900f35 100644 --- a/gcc/ada/a-cfhase.adb +++ b/gcc/ada/a-cfhase.adb @@ -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 -- diff --git a/gcc/ada/a-cfhase.ads b/gcc/ada/a-cfhase.ads index 0c43cf2..7ab1611 100644 --- a/gcc/ada/a-cfhase.ads +++ b/gcc/ada/a-cfhase.ads @@ -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, diff --git a/gcc/ada/a-cfinve.adb b/gcc/ada/a-cfinve.adb index da23a44..b520d65 100644 --- a/gcc/ada/a-cfinve.adb +++ b/gcc/ada/a-cfinve.adb @@ -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; diff --git a/gcc/ada/a-cfinve.ads b/gcc/ada/a-cfinve.ads index 17f6f7c..e76ae8d 100644 --- a/gcc/ada/a-cfinve.ads +++ b/gcc/ada/a-cfinve.ads @@ -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 .. diff --git a/gcc/ada/a-cforma.adb b/gcc/ada/a-cforma.adb index bd088bd..4bf302d 100644 --- a/gcc/ada/a-cforma.adb +++ b/gcc/ada/a-cforma.adb @@ -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 -- diff --git a/gcc/ada/a-cforma.ads b/gcc/ada/a-cforma.ads index 58a768c..018a21b 100644 --- a/gcc/ada/a-cforma.ads +++ b/gcc/ada/a-cforma.ads @@ -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; diff --git a/gcc/ada/a-cforse.adb b/gcc/ada/a-cforse.adb index cf4e2ab..42a8503 100644 --- a/gcc/ada/a-cforse.adb +++ b/gcc/ada/a-cforse.adb @@ -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 -- diff --git a/gcc/ada/a-cforse.ads b/gcc/ada/a-cforse.ads index a3cbae1..f7f03ca 100644 --- a/gcc/ada/a-cforse.ads +++ b/gcc/ada/a-cforse.ads @@ -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 diff --git a/gcc/ada/a-cidlli.adb b/gcc/ada/a-cidlli.adb index 7cb4c87..58c1e93 100644 --- a/gcc/ada/a-cidlli.adb +++ b/gcc/ada/a-cidlli.adb @@ -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 diff --git a/gcc/ada/a-cidlli.ads b/gcc/ada/a-cidlli.ads index 5b18110..44dc32d 100644 --- a/gcc/ada/a-cidlli.ads +++ b/gcc/ada/a-cidlli.ads @@ -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; diff --git a/gcc/ada/a-cihama.adb b/gcc/ada/a-cihama.adb index 1183100..f81bfc8 100644 --- a/gcc/ada/a-cihama.adb +++ b/gcc/ada/a-cihama.adb @@ -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 diff --git a/gcc/ada/a-cihama.ads b/gcc/ada/a-cihama.ads index e0584a8..5ad6588 100644 --- a/gcc/ada/a-cihama.ads +++ b/gcc/ada/a-cihama.ads @@ -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; diff --git a/gcc/ada/a-cihase.adb b/gcc/ada/a-cihase.adb index 655304f..ea7ee22 100644 --- a/gcc/ada/a-cihase.adb +++ b/gcc/ada/a-cihase.adb @@ -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 diff --git a/gcc/ada/a-cihase.ads b/gcc/ada/a-cihase.ads index d908d7f..2eae9d2 100644 --- a/gcc/ada/a-cihase.ads +++ b/gcc/ada/a-cihase.ads @@ -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; diff --git a/gcc/ada/a-cimutr.adb b/gcc/ada/a-cimutr.adb index 326c117..756b512 100644 --- a/gcc/ada/a-cimutr.adb +++ b/gcc/ada/a-cimutr.adb @@ -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 diff --git a/gcc/ada/a-cimutr.ads b/gcc/ada/a-cimutr.ads index ad7e34c..7edb0d1 100644 --- a/gcc/ada/a-cimutr.ads +++ b/gcc/ada/a-cimutr.ads @@ -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; diff --git a/gcc/ada/a-ciorma.adb b/gcc/ada/a-ciorma.adb index 3d4a92f..5d07151 100644 --- a/gcc/ada/a-ciorma.adb +++ b/gcc/ada/a-ciorma.adb @@ -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"); diff --git a/gcc/ada/a-ciorma.ads b/gcc/ada/a-ciorma.ads index 62bd687..fa65755 100644 --- a/gcc/ada/a-ciorma.ads +++ b/gcc/ada/a-ciorma.ads @@ -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; diff --git a/gcc/ada/a-ciormu.adb b/gcc/ada/a-ciormu.adb index 8888e27..4bf00c6 100644 --- a/gcc/ada/a-ciormu.adb +++ b/gcc/ada/a-ciormu.adb @@ -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 diff --git a/gcc/ada/a-ciormu.ads b/gcc/ada/a-ciormu.ads index 0663b67..4eab5b1 100644 --- a/gcc/ada/a-ciormu.ads +++ b/gcc/ada/a-ciormu.ads @@ -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; diff --git a/gcc/ada/a-ciorse.adb b/gcc/ada/a-ciorse.adb index 62b7c43..6ebc143 100644 --- a/gcc/ada/a-ciorse.adb +++ b/gcc/ada/a-ciorse.adb @@ -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 diff --git a/gcc/ada/a-ciorse.ads b/gcc/ada/a-ciorse.ads index 15589b8..2e1c018 100644 --- a/gcc/ada/a-ciorse.ads +++ b/gcc/ada/a-ciorse.ads @@ -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; diff --git a/gcc/ada/a-coboho.adb b/gcc/ada/a-coboho.adb index 590e807..75fc638 100644 --- a/gcc/ada/a-coboho.adb +++ b/gcc/ada/a-coboho.adb @@ -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 diff --git a/gcc/ada/a-coboho.ads b/gcc/ada/a-coboho.ads index 8764410..67b27f2 100644 --- a/gcc/ada/a-coboho.ads +++ b/gcc/ada/a-coboho.ads @@ -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: diff --git a/gcc/ada/a-cobove.adb b/gcc/ada/a-cobove.adb index fca300d..59d6c27 100644 --- a/gcc/ada/a-cobove.adb +++ b/gcc/ada/a-cobove.adb @@ -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 diff --git a/gcc/ada/a-cobove.ads b/gcc/ada/a-cobove.ads index 869f2bb..c315702 100644 --- a/gcc/ada/a-cobove.ads +++ b/gcc/ada/a-cobove.ads @@ -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; diff --git a/gcc/ada/a-cofove.adb b/gcc/ada/a-cofove.adb index c713bbc..ac82085 100644 --- a/gcc/ada/a-cofove.adb +++ b/gcc/ada/a-cofove.adb @@ -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 diff --git a/gcc/ada/a-cofove.ads b/gcc/ada/a-cofove.ads index 622454e..e8a3c94 100644 --- a/gcc/ada/a-cofove.ads +++ b/gcc/ada/a-cofove.ads @@ -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 .. diff --git a/gcc/ada/a-cohama.adb b/gcc/ada/a-cohama.adb index 969bf9b..20a48b6 100644 --- a/gcc/ada/a-cohama.adb +++ b/gcc/ada/a-cohama.adb @@ -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 diff --git a/gcc/ada/a-cohama.ads b/gcc/ada/a-cohama.ads index c398812..7443b54 100644 --- a/gcc/ada/a-cohama.ads +++ b/gcc/ada/a-cohama.ads @@ -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; diff --git a/gcc/ada/a-cohase.adb b/gcc/ada/a-cohase.adb index 125f6b0..5f31e58 100644 --- a/gcc/ada/a-cohase.adb +++ b/gcc/ada/a-cohase.adb @@ -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 diff --git a/gcc/ada/a-cohase.ads b/gcc/ada/a-cohase.ads index 97cd5f1..681087a 100644 --- a/gcc/ada/a-cohase.ads +++ b/gcc/ada/a-cohase.ads @@ -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; diff --git a/gcc/ada/a-coinho-shared.adb b/gcc/ada/a-coinho-shared.adb index 9dd5b2f..81732b9 100644 --- a/gcc/ada/a-coinho-shared.adb +++ b/gcc/ada/a-coinho-shared.adb @@ -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); diff --git a/gcc/ada/a-coinho-shared.ads b/gcc/ada/a-coinho-shared.ads index 49b91fd..e5dfb54 100644 --- a/gcc/ada/a-coinho-shared.ads +++ b/gcc/ada/a-coinho-shared.ads @@ -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); diff --git a/gcc/ada/a-coinho.adb b/gcc/ada/a-coinho.adb index 0135ea5..e9f40ac 100644 --- a/gcc/ada/a-coinho.adb +++ b/gcc/ada/a-coinho.adb @@ -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); diff --git a/gcc/ada/a-coinho.ads b/gcc/ada/a-coinho.ads index 271d4ea..7cfd193 100644 --- a/gcc/ada/a-coinho.ads +++ b/gcc/ada/a-coinho.ads @@ -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); diff --git a/gcc/ada/a-coinve.adb b/gcc/ada/a-coinve.adb index 0053de0..7843b5e 100644 --- a/gcc/ada/a-coinve.adb +++ b/gcc/ada/a-coinve.adb @@ -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 diff --git a/gcc/ada/a-coinve.ads b/gcc/ada/a-coinve.ads index 1a0ce99..8be2121 100644 --- a/gcc/ada/a-coinve.ads +++ b/gcc/ada/a-coinve.ads @@ -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; diff --git a/gcc/ada/a-comutr.adb b/gcc/ada/a-comutr.adb index 08aa4c9..68d49aa 100644 --- a/gcc/ada/a-comutr.adb +++ b/gcc/ada/a-comutr.adb @@ -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 diff --git a/gcc/ada/a-comutr.ads b/gcc/ada/a-comutr.ads index 81a89e9..ef55696 100644 --- a/gcc/ada/a-comutr.ads +++ b/gcc/ada/a-comutr.ads @@ -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; diff --git a/gcc/ada/a-conhel.adb b/gcc/ada/a-conhel.adb index de66a50..f433250 100644 --- a/gcc/ada/a-conhel.adb +++ b/gcc/ada/a-conhel.adb @@ -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; ------------ diff --git a/gcc/ada/a-conhel.ads b/gcc/ada/a-conhel.ads index e48c03b..74e5151 100644 --- a/gcc/ada/a-conhel.ads +++ b/gcc/ada/a-conhel.ads @@ -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 diff --git a/gcc/ada/a-convec.adb b/gcc/ada/a-convec.adb index c009b6b..380a10b 100644 --- a/gcc/ada/a-convec.adb +++ b/gcc/ada/a-convec.adb @@ -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 diff --git a/gcc/ada/a-convec.ads b/gcc/ada/a-convec.ads index 413403d..5e0de79 100644 --- a/gcc/ada/a-convec.ads +++ b/gcc/ada/a-convec.ads @@ -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; diff --git a/gcc/ada/a-coorma.adb b/gcc/ada/a-coorma.adb index 3ad48e6..6083b4c 100644 --- a/gcc/ada/a-coorma.adb +++ b/gcc/ada/a-coorma.adb @@ -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 diff --git a/gcc/ada/a-coorma.ads b/gcc/ada/a-coorma.ads index 5687780..3034a2e 100644 --- a/gcc/ada/a-coorma.ads +++ b/gcc/ada/a-coorma.ads @@ -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; diff --git a/gcc/ada/a-coormu.adb b/gcc/ada/a-coormu.adb index 1b9852f..75969d0 100644 --- a/gcc/ada/a-coormu.adb +++ b/gcc/ada/a-coormu.adb @@ -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 diff --git a/gcc/ada/a-coormu.ads b/gcc/ada/a-coormu.ads index db47c19..5fd8a81 100644 --- a/gcc/ada/a-coormu.ads +++ b/gcc/ada/a-coormu.ads @@ -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; diff --git a/gcc/ada/a-coorse.adb b/gcc/ada/a-coorse.adb index a92ed7f..78345c9 100644 --- a/gcc/ada/a-coorse.adb +++ b/gcc/ada/a-coorse.adb @@ -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 diff --git a/gcc/ada/a-coorse.ads b/gcc/ada/a-coorse.ads index d127a52..1260fba 100644 --- a/gcc/ada/a-coorse.ads +++ b/gcc/ada/a-coorse.ads @@ -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; diff --git a/gcc/ada/a-cuprqu.adb b/gcc/ada/a-cuprqu.adb index dfb7868..e694786 100644 --- a/gcc/ada/a-cuprqu.adb +++ b/gcc/ada/a-cuprqu.adb @@ -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 ----------------------- diff --git a/gcc/ada/a-cuprqu.ads b/gcc/ada/a-cuprqu.ads index 4e11d6e..4cc000d 100644 --- a/gcc/ada/a-cuprqu.ads +++ b/gcc/ada/a-cuprqu.ads @@ -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 diff --git a/gcc/ada/a-cusyqu.adb b/gcc/ada/a-cusyqu.adb index 3a87306..4183dcb 100644 --- a/gcc/ada/a-cusyqu.adb +++ b/gcc/ada/a-cusyqu.adb @@ -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 ----------------------- diff --git a/gcc/ada/a-cusyqu.ads b/gcc/ada/a-cusyqu.ads index c4f1802..7efdbf4 100644 --- a/gcc/ada/a-cusyqu.ads +++ b/gcc/ada/a-cusyqu.ads @@ -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 diff --git a/gcc/ada/a-rbtgbo.adb b/gcc/ada/a-rbtgbo.adb index 0ef7b02..acf2ccb 100644 --- a/gcc/ada/a-rbtgbo.adb +++ b/gcc/ada/a-rbtgbo.adb @@ -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 diff --git a/gcc/ada/a-rbtgbo.ads b/gcc/ada/a-rbtgbo.ads index 2f8b783..4045182 100644 --- a/gcc/ada/a-rbtgbo.ads +++ b/gcc/ada/a-rbtgbo.ads @@ -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; diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index cfb3b45..4864fbf 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -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 diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index 781f3a9..e602b4b 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -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; diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 45d223c..fa263b5 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -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. diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index ca0f33b..c385a25 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -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); diff --git a/gcc/ada/gnatname.adb b/gcc/ada/gnatname.adb index d95da85..5af5d53 100644 --- a/gcc/ada/gnatname.adb +++ b/gcc/ada/gnatname.adb @@ -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 diff --git a/gcc/ada/sigtramp.h b/gcc/ada/sigtramp.h index bf872f5..7af6be3 100644 --- a/gcc/ada/sigtramp.h +++ b/gcc/ada/sigtramp.h @@ -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 diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 8312367..218f4bc 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -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 -- |