From dd270bcf72422688bbc5636d5639d0e1727d01b2 Mon Sep 17 00:00:00 2001 From: charlet Date: Wed, 11 Jun 2014 12:55:03 +0000 Subject: 2014-06-11 Robert Dewar * sem_ch13.adb: Minor reformatting. 2014-06-11 Hristian Kirtchev * sem_prag.adb (Check_Clause_Syntax): Add new local variable Outputs. Account for the case where multiple output items appear as an aggregate. 2014-06-11 Robert Dewar * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning with ?j? not ??. 2014-06-11 Ed Schonberg * einfo.ads: Minor reformatting. 2014-06-11 Hristian Kirtchev * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add new variable First_Node. Update the position after all insertions have taken place to First_Node. 2014-06-11 Robert Dewar * debug.adb: Remove debug flag -gnatd.1, no longer needed. * layout.adb (Layout_Type): Remove test of -gnatd.1. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211465 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/a-cdlili.adb | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'gcc/ada/a-cdlili.adb') diff --git a/gcc/ada/a-cdlili.adb b/gcc/ada/a-cdlili.adb index 9bd8899e2dd..eae608c05b2 100644 --- a/gcc/ada/a-cdlili.adb +++ b/gcc/ada/a-cdlili.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2004-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -942,7 +942,8 @@ package body Ada.Containers.Doubly_Linked_Lists is Position : out Cursor; Count : Count_Type := 1) is - New_Node : Node_Access; + First_Node : Node_Access; + New_Node : Node_Access; begin if Before.Container /= null then @@ -966,15 +967,16 @@ package body Ada.Containers.Doubly_Linked_Lists is "attempt to tamper with cursors (list is busy)"; else - New_Node := new Node_Type'(New_Item, null, null); + New_Node := new Node_Type'(New_Item, null, null); + First_Node := New_Node; Insert_Internal (Container, Before.Node, New_Node); - Position := Cursor'(Container'Unchecked_Access, New_Node); - for J in 2 .. Count loop New_Node := new Node_Type'(New_Item, null, null); Insert_Internal (Container, Before.Node, New_Node); end loop; + + Position := Cursor'(Container'Unchecked_Access, First_Node); end if; end Insert; @@ -996,7 +998,8 @@ package body Ada.Containers.Doubly_Linked_Lists is Position : out Cursor; Count : Count_Type := 1) is - New_Node : Node_Access; + First_Node : Node_Access; + New_Node : Node_Access; begin if Before.Container /= null then @@ -1021,15 +1024,16 @@ package body Ada.Containers.Doubly_Linked_Lists is "attempt to tamper with cursors (list is busy)"; else - New_Node := new Node_Type; + New_Node := new Node_Type; + First_Node := New_Node; Insert_Internal (Container, Before.Node, New_Node); - Position := Cursor'(Container'Unchecked_Access, New_Node); - for J in 2 .. Count loop New_Node := new Node_Type; Insert_Internal (Container, Before.Node, New_Node); end loop; + + Position := Cursor'(Container'Unchecked_Access, First_Node); end if; end Insert; -- cgit v1.2.1