[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 16 Oct 2015 13:08:04 +0000 (15:08 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 16 Oct 2015 13:08:04 +0000 (15:08 +0200)
commit2a738b3469af68a64477662c051424b9a089ce62
tree1d41250e0f7f27f5af42b4a3299081020a910f31
parent00c93ba2f24b4f23328c7f98c366a5fb2ec65108
[multiple changes]

2015-10-16  Bob Duff  <duff@adacore.com>

* a-contai.ads: Add two check names: Container_Checks and
Tampering_Check.  Move the tampering check machinery from
Ada.Containers.Vectors to Ada.Containers. Later we can share it
with other containers.
Disable the tampering machinery in the presence of
Suppress(Tampering_Check).
Simplify the implementation of tampering checks. E.g. use RAII
to make incrementing/decrementing of the counts more concise.
* a-contai.adb: New package body, implementing the above.
* a-convec.ads, a-convec.adb: Use tampering check machinery
in Ada.Containers.
Disable all checking code when checks are suppressed.
Simplify many of the operations. Implement "&" in terms of Append,
rather than "by hand".
Remove: function "=" (L, R : Elements_Array) return Boolean is
abstract; so we can call the predefined "=" on Elements_Array.
For "=" on Vectors: Previously, we returned True immediately if
Left'Address = Right'Address.  That seems like a non-optimization
("if X = X" is unusual), so removed that.  Simplify by using
slice comparison ("=" on Element_Array will automatically call
"=" on the components, even if user defined).

2015-10-16  Ed Schonberg  <schonberg@adacore.com>

* sem_ch13.adb (Chek_Record_Representation_Clause): When
iterating over components, skip anonymous subtypes created for
constrained array components.

From-SVN: r228896
gcc/ada/ChangeLog
gcc/ada/a-contai.adb [new file with mode: 0644]
gcc/ada/a-contai.ads
gcc/ada/a-convec.adb
gcc/ada/a-convec.ads
gcc/ada/sem_ch13.adb