2015-10-16 Bob Duff <duff@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Oct 2015 13:08:04 +0000 (13:08 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Oct 2015 13:08:04 +0000 (13:08 +0000)
commitb7df4cdaaf11ec2576e8bdb78bc17a133a113d6b
tree1d41250e0f7f27f5af42b4a3299081020a910f31
parentb2e821de7f4f98cc3795d9dd4d503cd19d61e307
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228896 138bc75d-0d04-0410-961f-82ee72b054a4
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