diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-11 12:55:03 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-11 12:55:03 +0000 |
commit | dd270bcf72422688bbc5636d5639d0e1727d01b2 (patch) | |
tree | f73f8b17c296c9fe0999681f9e00daaf7924bb08 /gcc/ada/a-cdlili.adb | |
parent | e12b2502c273421e607e30b2c8fa13b5feee3fe3 (diff) | |
download | gcc-dd270bcf72422688bbc5636d5639d0e1727d01b2.tar.gz |
2014-06-11 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb: Minor reformatting.
2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
* 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 <dewar@adacore.com>
* sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
with ?j? not ??.
2014-06-11 Ed Schonberg <schonberg@adacore.com>
* einfo.ads: Minor reformatting.
2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
* 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 <dewar@adacore.com>
* 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
Diffstat (limited to 'gcc/ada/a-cdlili.adb')
-rw-r--r-- | gcc/ada/a-cdlili.adb | 22 |
1 files changed, 13 insertions, 9 deletions
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; |