From e7f567a338ca40ad1dc232c2d523810f70bd9478 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 1 Aug 2011 11:15:30 +0200 Subject: [PATCH] [multiple changes] 2011-08-01 Matthew Heaney * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child of node. 2011-08-01 Pascal Obry * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor reformatting. From-SVN: r177003 --- gcc/ada/ChangeLog | 10 ++++++++++ gcc/ada/a-rbtgbo.adb | 2 +- gcc/ada/a-strunb-shared.adb | 2 +- gcc/ada/a-stwiun-shared.adb | 38 ++++++++++++++++++------------------- gcc/ada/a-stzunb-shared.adb | 38 ++++++++++++++++++------------------- 5 files changed, 50 insertions(+), 40 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 101b285d6b7..68e005c5296 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2011-08-01 Matthew Heaney + + * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child + of node. + +2011-08-01 Pascal Obry + + * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor + reformatting. + 2011-08-01 Ed Schonberg * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named diff --git a/gcc/ada/a-rbtgbo.adb b/gcc/ada/a-rbtgbo.adb index 88743b3ce5b..60a84a0c397 100644 --- a/gcc/ada/a-rbtgbo.adb +++ b/gcc/ada/a-rbtgbo.adb @@ -330,7 +330,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Bounded_Operations is Set_Right (N (Parent (N (Z))), Y); end if; - Set_Left (N (Y), Z); + Set_Left (N (Y), Left (N (Z))); Set_Parent (N (Left (N (Y))), Y); Set_Right (N (Y), Z); Set_Parent (N (Z), Y); diff --git a/gcc/ada/a-strunb-shared.adb b/gcc/ada/a-strunb-shared.adb index a85e6696931..bfa4875f588 100644 --- a/gcc/ada/a-strunb-shared.adb +++ b/gcc/ada/a-strunb-shared.adb @@ -1298,7 +1298,7 @@ package body Ada.Strings.Unbounded is DR : Shared_String_Access; begin - -- Bounds check. + -- Bounds check if Index <= SR.Last then diff --git a/gcc/ada/a-stwiun-shared.adb b/gcc/ada/a-stwiun-shared.adb index 6a9f7a60ae6..b06a9d0ec8f 100644 --- a/gcc/ada/a-stwiun-shared.adb +++ b/gcc/ada/a-stwiun-shared.adb @@ -80,25 +80,25 @@ package body Ada.Strings.Wide_Unbounded is DR : Shared_Wide_String_Access; begin - -- Result is an empty string, reuse shared empty string. + -- Result is an empty string, reuse shared empty string if DL = 0 then Reference (Empty_Shared_Wide_String'Access); DR := Empty_Shared_Wide_String'Access; - -- Left string is empty, return Right string. + -- Left string is empty, return Rigth string elsif LR.Last = 0 then Reference (RR); DR := RR; - -- Right string is empty, return Left string. + -- Right string is empty, return Left string elsif RR.Last = 0 then Reference (LR); DR := LR; - -- Otherwise, allocate new shared string and fill data. + -- Overwise, allocate new shared string and fill data else DR := Allocate (LR.Last + RR.Last); @@ -119,19 +119,19 @@ package body Ada.Strings.Wide_Unbounded is DR : Shared_Wide_String_Access; begin - -- Result is an empty string, reuse shared empty string. + -- Result is an empty string, reuse shared empty string if DL = 0 then Reference (Empty_Shared_Wide_String'Access); DR := Empty_Shared_Wide_String'Access; - -- Right is an empty string, return Left string. + -- Right is an empty string, return Left string elsif Right'Length = 0 then Reference (LR); DR := LR; - -- Otherwise, allocate new shared string and fill it. + -- Otherwise, allocate new shared string and fill it else DR := Allocate (DL); @@ -152,19 +152,19 @@ package body Ada.Strings.Wide_Unbounded is DR : Shared_Wide_String_Access; begin - -- Result is an empty string, reuse shared one. + -- Result is an empty string, reuse shared one if DL = 0 then Reference (Empty_Shared_Wide_String'Access); DR := Empty_Shared_Wide_String'Access; - -- Left is empty string, return Right string. + -- Left is empty string, return Right string elsif Left'Length = 0 then Reference (RR); DR := RR; - -- Otherwise, allocate new shared string and fill it. + -- Otherwise, allocate new shared string and fill it else DR := Allocate (DL); @@ -221,13 +221,13 @@ package body Ada.Strings.Wide_Unbounded is DR : Shared_Wide_String_Access; begin - -- Result is an empty string, reuse shared empty string. + -- Result is an empty string, reuse shared empty string if Left = 0 then Reference (Empty_Shared_Wide_String'Access); DR := Empty_Shared_Wide_String'Access; - -- Otherwise, allocate new shared string and fill it. + -- Otherwise, allocate new shared string and fill it else DR := Allocate (Left); @@ -251,13 +251,13 @@ package body Ada.Strings.Wide_Unbounded is K : Positive; begin - -- Result is an empty string, reuse shared empty string. + -- Result is an empty string, reuse shared empty string if DL = 0 then Reference (Empty_Shared_Wide_String'Access); DR := Empty_Shared_Wide_String'Access; - -- Otherwise, allocate new shared string and fill it. + -- Otherwise, allocate new shared string and fill it else DR := Allocate (DL); @@ -284,19 +284,19 @@ package body Ada.Strings.Wide_Unbounded is K : Positive; begin - -- Result is an empty string, reuse shared empty string. + -- Result is an empty string, reuse shared empty string if DL = 0 then Reference (Empty_Shared_Wide_String'Access); DR := Empty_Shared_Wide_String'Access; - -- Coefficient is one, just return string itself. + -- Coefficient is one, just return string itself elsif Left = 1 then Reference (RR); DR := RR; - -- Otherwise, allocate new shared string and fill it. + -- Otherwise, allocate new shared string and fill it else DR := Allocate (DL); @@ -393,7 +393,7 @@ package body Ada.Strings.Wide_Unbounded is begin return LR = RR or else LR.Data (1 .. LR.Last) = RR.Data (1 .. RR.Last); - -- LR = RR means two strings shares shared string, thus they are equal. + -- LR = RR means two strings shares shared string, thus they are equal end "="; function "=" @@ -1310,7 +1310,7 @@ package body Ada.Strings.Wide_Unbounded is DR : Shared_Wide_String_Access; begin - -- Bounds check. + -- Bounds check if Index <= SR.Last then diff --git a/gcc/ada/a-stzunb-shared.adb b/gcc/ada/a-stzunb-shared.adb index bed79790a3c..08c20a0fa3f 100644 --- a/gcc/ada/a-stzunb-shared.adb +++ b/gcc/ada/a-stzunb-shared.adb @@ -80,25 +80,25 @@ package body Ada.Strings.Wide_Wide_Unbounded is DR : Shared_Wide_Wide_String_Access; begin - -- Result is an empty string, reuse shared empty string. + -- Result is an empty string, reuse shared empty string if DL = 0 then Reference (Empty_Shared_Wide_Wide_String'Access); DR := Empty_Shared_Wide_Wide_String'Access; - -- Left string is empty, return Right string. + -- Left string is empty, return Rigth string elsif LR.Last = 0 then Reference (RR); DR := RR; - -- Right string is empty, return Left string. + -- Right string is empty, return Left string elsif RR.Last = 0 then Reference (LR); DR := LR; - -- Otherwise, allocate new shared string and fill data. + -- Overwise, allocate new shared string and fill data else DR := Allocate (LR.Last + RR.Last); @@ -119,19 +119,19 @@ package body Ada.Strings.Wide_Wide_Unbounded is DR : Shared_Wide_Wide_String_Access; begin - -- Result is an empty string, reuse shared empty string. + -- Result is an empty string, reuse shared empty string if DL = 0 then Reference (Empty_Shared_Wide_Wide_String'Access); DR := Empty_Shared_Wide_Wide_String'Access; - -- Right is an empty string, return Left string. + -- Right is an empty string, return Left string elsif Right'Length = 0 then Reference (LR); DR := LR; - -- Otherwise, allocate new shared string and fill it. + -- Otherwise, allocate new shared string and fill it else DR := Allocate (DL); @@ -152,19 +152,19 @@ package body Ada.Strings.Wide_Wide_Unbounded is DR : Shared_Wide_Wide_String_Access; begin - -- Result is an empty string, reuse shared one. + -- Result is an empty string, reuse shared one if DL = 0 then Reference (Empty_Shared_Wide_Wide_String'Access); DR := Empty_Shared_Wide_Wide_String'Access; - -- Left is empty string, return Right string. + -- Left is empty string, return Right string elsif Left'Length = 0 then Reference (RR); DR := RR; - -- Otherwise, allocate new shared string and fill it. + -- Otherwise, allocate new shared string and fill it else DR := Allocate (DL); @@ -221,13 +221,13 @@ package body Ada.Strings.Wide_Wide_Unbounded is DR : Shared_Wide_Wide_String_Access; begin - -- Result is an empty string, reuse shared empty string. + -- Result is an empty string, reuse shared empty string if Left = 0 then Reference (Empty_Shared_Wide_Wide_String'Access); DR := Empty_Shared_Wide_Wide_String'Access; - -- Otherwise, allocate new shared string and fill it. + -- Otherwise, allocate new shared string and fill it else DR := Allocate (Left); @@ -251,13 +251,13 @@ package body Ada.Strings.Wide_Wide_Unbounded is K : Positive; begin - -- Result is an empty string, reuse shared empty string. + -- Result is an empty string, reuse shared empty string if DL = 0 then Reference (Empty_Shared_Wide_Wide_String'Access); DR := Empty_Shared_Wide_Wide_String'Access; - -- Otherwise, allocate new shared string and fill it. + -- Otherwise, allocate new shared string and fill it else DR := Allocate (DL); @@ -284,19 +284,19 @@ package body Ada.Strings.Wide_Wide_Unbounded is K : Positive; begin - -- Result is an empty string, reuse shared empty string. + -- Result is an empty string, reuse shared empty string if DL = 0 then Reference (Empty_Shared_Wide_Wide_String'Access); DR := Empty_Shared_Wide_Wide_String'Access; - -- Coefficient is one, just return string itself. + -- Coefficient is one, just return string itself elsif Left = 1 then Reference (RR); DR := RR; - -- Otherwise, allocate new shared string and fill it. + -- Otherwise, allocate new shared string and fill it else DR := Allocate (DL); @@ -393,7 +393,7 @@ package body Ada.Strings.Wide_Wide_Unbounded is begin return LR = RR or else LR.Data (1 .. LR.Last) = RR.Data (1 .. RR.Last); - -- LR = RR means two strings shares shared string, thus they are equal. + -- LR = RR means two strings shares shared string, thus they are equal end "="; function "=" @@ -1320,7 +1320,7 @@ package body Ada.Strings.Wide_Wide_Unbounded is DR : Shared_Wide_Wide_String_Access; begin - -- Bounds check. + -- Bounds check if Index <= SR.Last then