egcs-971016/libstc++/stl/tree.h patch (revised again)

Greg Galloway gregg@eoeml.gtri.gatech.edu
Fri Oct 17 15:05:00 GMT 1997


Fri Oct 17 13:14:04 EDT 1997  Gregory L. Galloway <gregg@eoeml.gtri.gatech.edu>

	* tree.h(rb_tree): Member initializers reordered to match declaration 
	order and suppress compiler warning.
	(create_node): Moved return stmt outside try block to suppress warning.

*** libstdc++/stl/tree.h.orig	Fri Oct 17 13:11:28 1997
--- libstdc++/stl/tree.h	Fri Oct 17 13:12:32 1997
***************
*** 439,445 ****
        try {
  #         endif /* __STL_USE_EXCEPTIONS */
          construct(&tmp->value_field, x);
-         return tmp;
  #         ifdef __STL_USE_EXCEPTIONS
        }
        catch(...) {
--- 439,444 ----
***************
*** 447,452 ****
--- 446,452 ----
          throw;
        }
  #         endif /* __STL_USE_EXCEPTIONS */
+       return tmp;
      }
  
      link_type clone_node(link_type x) {
***************
*** 523,532 ****
  public:
                                  // allocation/deallocation
      rb_tree(const Compare& comp = Compare())
!       : key_compare(comp), node_count(0) { init(); }
  
      rb_tree(const rb_tree<Key, Value, KeyOfValue, Compare, Alloc>& x) 
!       : key_compare(x.key_compare), node_count(0) { 
          header = get_node();
          color(header) = __rb_tree_red;
          if (x.root() == 0) {
--- 523,532 ----
  public:
                                  // allocation/deallocation
      rb_tree(const Compare& comp = Compare())
!       : node_count(0), key_compare(comp) { init(); }
  
      rb_tree(const rb_tree<Key, Value, KeyOfValue, Compare, Alloc>& x) 
!       : node_count(0), key_compare(x.key_compare) { 
          header = get_node();
          color(header) = __rb_tree_red;
          if (x.root() == 0) {



More information about the Gcc mailing list