V3 PATCH: ios_base::failure cleanup

Gabriel Dos Reis gdr@codesourcery.com
Wed Nov 22 20:57:00 GMT 2000


This patch moves definitions of the virtuals
ios_base::failure::~failure and ios_base::failure::what into
src/ios.cc.

-- Gabriel
CodeSourcery, LLC            http://www.codesourcery.com
     http://www.codesourcery.com/gcc-compile.shtml

2000-11-23  Gabriel Dos Reis  <gdr@codesourcery.com>

	* include/bits/ios_base.h (ios_base::failure::~failure,
	ios_base::failure::what): Move defintion to ...

	* src/ios.cc (ios_base::failure::~failure): ... here.
	src/ios.cc (ios::failure::what): Likewise.
  
  	* config/os/bsd/bits/ctype_inline.h (is): Fix order of expressions.
Index: include/bits/ios_base.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/ios_base.h,v
retrieving revision 1.2
diff -p -r1.2 ios_base.h
*** ios_base.h	2000/11/20 08:25:18	1.2
--- ios_base.h	2000/11/23 04:52:06
***************
*** 1,6 ****
  // Iostreams base classes -*- C++ -*-
  
! // Copyright (C) 1997-1999 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // Iostreams base classes -*- C++ -*-
  
! // Copyright (C) 1997-2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
*************** namespace std {
*** 149,158 ****
        failure(const string& __str);
  
        virtual 
!       ~failure() { };
  
!       virtual const 
!       char* what() const throw() { return _M_name; }
        
      private:
        enum { _M_bufsize = 256 };
--- 149,158 ----
        failure(const string& __str);
  
        virtual 
!       ~failure();
  
!       virtual const char*
!       what() const throw();
        
      private:
        enum { _M_bufsize = 256 };
Index: src/ios.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/src/ios.cc,v
retrieving revision 1.6
diff -p -r1.6 ios.cc
*** ios.cc	2000/09/01 08:56:58	1.6
--- ios.cc	2000/11/23 04:52:06
*************** namespace std {
*** 114,119 ****
--- 114,126 ----
      _M_name[_M_bufsize - 1] = '\0';
    }
  
+   ios_base::failure::~failure()
+   { }
+ 
+   const char*
+   ios_base::failure::what() const throw()
+   { return _M_name; }
+ 
    ios_base::Init::Init()
    {
      if (++_S_ios_base_init == 1)


More information about the Gcc-patches mailing list