This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

EGCS 191016: STL: order of declaration patch



Using `-Wall' produced warnings from `include/g++/tree.h' because the
declaration order didn't match the construction order.  This patch
fixes that.

Is this the right place to report the problem?

1997-10-22  Per Abrahamsen  <abraham@dina.kvl.dk>

	* tree.h: Put `node_count' after `key_compare' to avoid warning
	about reordering declarations in the constructor.

*** tree.h~	Tue Oct 21 18:56:28 1997
--- tree.h	Wed Oct 22 16:57:40 1997
***************
*** 463,471 ****
      }
  
  protected:
-     size_type node_count; // keeps track of size of tree
      link_type header;  
      Compare key_compare;
  
      link_type& root() const { return (link_type&) header->parent; }
      link_type& leftmost() const { return (link_type&) header->left; }
--- 463,471 ----
      }
  
  protected:
      link_type header;  
      Compare key_compare;
+     size_type node_count; // keeps track of size of tree
  
      link_type& root() const { return (link_type&) header->parent; }
      link_type& leftmost() const { return (link_type&) header->left; }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]