diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-10-10 15:28:21 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-10-10 15:28:21 +0200 |
commit | 80363c2f0bf302e569c12d86352e4d086c2e6d4d (patch) | |
tree | c0a1af73f0e07dee9b5802115990158c3bc85faf /gcc/ada | |
parent | d56f4479e63df5de87b47572640de835924cf443 (diff) | |
download | gcc-80363c2f0bf302e569c12d86352e4d086c2e6d4d.zip gcc-80363c2f0bf302e569c12d86352e4d086c2e6d4d.tar.gz gcc-80363c2f0bf302e569c12d86352e4d086c2e6d4d.tar.bz2 |
[multiple changes]
2014-10-10 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb: Minor code reorganization.
2014-10-10 Pat Rogers <rogers@adacore.com>
* gnat_rm.texi: Text now indicates pragma No_Run_Time is not
for users.
2014-10-10 Vadim Godunko <godunko@adacore.com>
* a-coinho-shared.adb: Add minor comment.
* a-stzmap.adb (To_Sequence): Compute size of result array.
From-SVN: r216081
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/ada/a-coinho-shared.adb | 7 | ||||
-rw-r--r-- | gcc/ada/a-stzmap.adb | 25 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 8 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.adb | 7 |
5 files changed, 43 insertions, 18 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d8408eb..c7df2c1 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,17 @@ +2014-10-10 Robert Dewar <dewar@adacore.com> + + * sem_ch13.adb: Minor code reorganization. + +2014-10-10 Pat Rogers <rogers@adacore.com> + + * gnat_rm.texi: Text now indicates pragma No_Run_Time is not + for users. + +2014-10-10 Vadim Godunko <godunko@adacore.com> + + * a-coinho-shared.adb: Add minor comment. + * a-stzmap.adb (To_Sequence): Compute size of result array. + 2014-10-10 Javier Miranda <miranda@adacore.com> * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an diff --git a/gcc/ada/a-coinho-shared.adb b/gcc/ada/a-coinho-shared.adb index 1f3d8bc..94d4fe4 100644 --- a/gcc/ada/a-coinho-shared.adb +++ b/gcc/ada/a-coinho-shared.adb @@ -25,6 +25,13 @@ -- <http://www.gnu.org/licenses/>. -- ------------------------------------------------------------------------------ +-- Note: special attention must be paid to the case of simultaneous access +-- to internal shared objects and elements by difference tasks. The Reference +-- counter of internal shared object is the only component protected using +-- atomic operations; other components and elements can be modified only when +-- reference counter is equal to one (so there are no other references to this +-- internal shared object and element). + with Ada.Unchecked_Deallocation; package body Ada.Containers.Indefinite_Holders is diff --git a/gcc/ada/a-stzmap.adb b/gcc/ada/a-stzmap.adb index 08cae19..0afe4ff 100644 --- a/gcc/ada/a-stzmap.adb +++ b/gcc/ada/a-stzmap.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, 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- -- @@ -570,20 +570,25 @@ package body Ada.Strings.Wide_Wide_Maps is function To_Sequence (Set : Wide_Wide_Character_Set) return Wide_Wide_Character_Sequence is - SS : constant Wide_Wide_Character_Ranges_Access := Set.Set; - - Result : Wide_Wide_String (Positive range 1 .. 2 ** 16); - N : Natural := 0; + SS : constant Wide_Wide_Character_Ranges_Access := Set.Set; + N : Natural := 0; + Count : Natural := 0; begin for J in SS'Range loop - for K in SS (J).Low .. SS (J).High loop - N := N + 1; - Result (N) := K; - end loop; + Count := + Count + (Wide_Wide_Character'Pos (SS (J).High) - + Wide_Wide_Character'Pos (SS (J).Low) + 1); end loop; - return Result (1 .. N); + return Result : Wide_Wide_String (1 .. Count) do + for J in SS'Range loop + for K in SS (J).Low .. SS (J).High loop + N := N + 1; + Result (N) := K; + end loop; + end loop; + end return; end To_Sequence; ------------ diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index e5a52bc..5554f68 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -4748,11 +4748,9 @@ pragma No_Run_Time; @noindent This is an obsolete configuration pragma that historically was used to -setup what is now called the "zero footprint" library. It causes any -library units outside this basic library to be ignored. The use of -this pragma has been superseded by the general configurable run-time -capability of @code{GNAT} where the compiler takes into account whatever -units happen to be accessible in the library. +set up a runtime library with no object code. It is now used only for +internal testing. The pragma has been superseded by the reconfigurable +runtime capability of @code{GNAT}. @node Pragma No_Strict_Aliasing @unnumberedsec Pragma No_Strict_Aliasing diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 10f4a74..709dabe 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -10706,10 +10706,11 @@ package body Sem_Ch13 is Set_Has_Inheritable_Invariants (Typ); end if; - -- If the full view of the type is a scalar type or array type, the - -- implicit base type created for it has the same invariant. + -- If we have a subtype with invariants, whose base type does not have + -- invariants, copy these invariants to the base type. This happens for + -- the case of implicit base types created for scalar and array types. - elsif Has_Invariants (Typ) and then Base_Type (Typ) /= Typ + elsif Has_Invariants (Typ) and then not Has_Invariants (Base_Type (Typ)) then Set_Has_Invariants (Base_Type (Typ)); |