diff options
Diffstat (limited to 'gcc/ada/a-rbtgbo.adb')
-rw-r--r-- | gcc/ada/a-rbtgbo.adb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/a-rbtgbo.adb b/gcc/ada/a-rbtgbo.adb index d6df756..ddf3fe2 100644 --- a/gcc/ada/a-rbtgbo.adb +++ b/gcc/ada/a-rbtgbo.adb @@ -626,6 +626,13 @@ package body Ada.Containers.Red_Black_Trees.Generic_Bounded_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. |