diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-31 09:07:20 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-31 09:07:20 +0000 |
commit | 5bfe95c7dfef79b7bfb6b9d8221283cb31f59901 (patch) | |
tree | 51ba512577c9b4202ce015f57c761ef8d3020acb /gcc/ada/a-crbltr.ads | |
parent | 6819394eec96204e3df6709b11e616354766fe8f (diff) | |
download | gcc-5bfe95c7dfef79b7bfb6b9d8221283cb31f59901.tar.gz |
2011-08-31 Robert Dewar <dewar@adacore.com>
* exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
lib-xref-alfa.adb: Minor reformatting.
2011-08-31 Matthew Heaney <heaney@adacore.com>
* a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
2011-08-31 Javier Miranda <miranda@adacore.com>
* sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
only for class-wide subprograms conflicting with entities of concurrent
tagged types.
2011-08-31 Matthew Heaney <heaney@adacore.com>
* a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
node to null value.
2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
general description of the routine.
2011-08-31 Ed Schonberg <schonberg@adacore.com>
* a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
doubly-linked lists.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178363 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-crbltr.ads')
-rw-r--r-- | gcc/ada/a-crbltr.ads | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ada/a-crbltr.ads b/gcc/ada/a-crbltr.ads index 30ceff71cc9..2991d36ee06 100644 --- a/gcc/ada/a-crbltr.ads +++ b/gcc/ada/a-crbltr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2011, 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- -- @@ -53,6 +53,13 @@ package Ada.Containers.Red_Black_Trees is package Generic_Bounded_Tree_Types is type Nodes_Type is array (Count_Type range <>) of Node_Type; + -- Note that objects of type Tree_Type are logically initialized (in the + -- sense that representation invariants of type are satisfied by dint of + -- default initialization), even without the Nodes component also having + -- its own initialization expression. We only initializae the Nodes + -- component here in order to prevent spurious compiler warnings about + -- the container object not being fully initialized. + type Tree_Type (Capacity : Count_Type) is tagged record First : Count_Type := 0; Last : Count_Type := 0; @@ -61,7 +68,7 @@ package Ada.Containers.Red_Black_Trees is Busy : Natural := 0; Lock : Natural := 0; Free : Count_Type'Base := -1; - Nodes : Nodes_Type (1 .. Capacity); + Nodes : Nodes_Type (1 .. Capacity) := (others => <>); end record; end Generic_Bounded_Tree_Types; |