summaryrefslogtreecommitdiff
path: root/gcc/ada/a-crbtgo.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-25 10:24:16 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-25 10:24:16 +0000
commit178fec9b19236a0941c463a2aa3e6a9be1211253 (patch)
tree5b761ff8a3430f85f2fe71c6bd7fb50553b2d45c /gcc/ada/a-crbtgo.adb
parent125dbd84d740878e0e8e92b3b215fdbea94e4c77 (diff)
downloadgcc-178fec9b19236a0941c463a2aa3e6a9be1211253.tar.gz
2013-04-25 Matthew Heaney <heaney@adacore.com>
* a-rbtgbo.adb, a-crbtgo.adb (Generic_Equal): do not test for tampering when container empty. * a-crbtgk.adb (Ceiling, Find, Floor): ditto. (Generic_Conditional_Insert, Generic_Conditional_Insert_With_Hint): ditto. 2013-04-25 Ed Schonberg <schonberg@adacore.com> * par-ch12.adb: Move aspects from package specification to generic package declaration. * sem_ch12.adb: Analyze aspect specifications before building and analyzing the generic copy, so that the generated pragmas are properly taken into account. * sem_ch13.adb: For compilation unit aspects that apply to a generic package declaration, insert corresponding pragmas ahead of visible declarations. * sprint.adb: Display properly the aspects of a generic type declaration. 2013-04-25 Robert Dewar <dewar@adacore.com> * frontend.adb: Minor reformatting. 2013-04-25 Ed Schonberg <schonberg@adacore.com> * einfo.ads: Extend documentation on use of Is_Private_Ancestor for untagged types. * sem_ch3.adb (Is_Visible_Component): Refine predicate for the case of untagged types derived from private types, to reject illegal selected components. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198285 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-crbtgo.adb')
-rw-r--r--gcc/ada/a-crbtgo.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/a-crbtgo.adb b/gcc/ada/a-crbtgo.adb
index 6cce55d25ab..1255ff59155 100644
--- a/gcc/ada/a-crbtgo.adb
+++ b/gcc/ada/a-crbtgo.adb
@@ -646,6 +646,13 @@ package body Ada.Containers.Red_Black_Trees.Generic_Operations is
return False;
end if;
+ -- If the containers are empty, return a result immediately, so as to
+ -- not manipulate the tamper bits unnecessarily.
+
+ if Left.Length = 0 then
+ return True;
+ end if;
+
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.