From f68147f702b0723df728592dfcd667de21ed4d3d Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Tue, 13 Mar 2001 19:32:00 +0000 Subject: [PATCH] new: Remove pragma interface. 2001-03-13 Benjamin Kosnik * libsupc++/new: Remove pragma interface. * libsupc++/typeinfo: Same. * libsupc++/exception: Same. * libsupc++/new_handler.cc: Remove pragma implementation. (bad_alloc::~bad_alloc()): Add. * libsupc++/exception_support.cc: Same. (exception::~exception): Add. (bad_exception::~bad_exception): Add. * libsupc++/tinfo.cc: Same. (bad_cast::~bad_cast): Add. (bad_typeid::~bad_typeid): Add. From-SVN: r40442 --- libstdc++-v3/ChangeLog | 14 ++++++++++++++ libstdc++-v3/libsupc++/exception | 6 ++---- libstdc++-v3/libsupc++/exception_support.cc | 10 ++++++++-- libstdc++-v3/libsupc++/new | 4 ++-- libstdc++-v3/libsupc++/new_handler.cc | 3 ++- libstdc++-v3/libsupc++/tinfo.cc | 5 +++-- libstdc++-v3/libsupc++/typeinfo | 6 ++---- 7 files changed, 33 insertions(+), 15 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fd8a5dacd98..fea829a5acb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,17 @@ +2001-03-13 Benjamin Kosnik + + * libsupc++/new: Remove pragma interface. + * libsupc++/typeinfo: Same. + * libsupc++/exception: Same. + * libsupc++/new_handler.cc: Remove pragma implementation. + (bad_alloc::~bad_alloc()): Add. + * libsupc++/exception_support.cc: Same. + (exception::~exception): Add. + (bad_exception::~bad_exception): Add. + * libsupc++/tinfo.cc: Same. + (bad_cast::~bad_cast): Add. + (bad_typeid::~bad_typeid): Add. + 2001-03-13 Phil Edwards * mkcheck.in: Fix IFS regression for non-bash-2.01 hosts. diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception index fac73fb0566..3676a731481 100644 --- a/libstdc++-v3/libsupc++/exception +++ b/libstdc++-v3/libsupc++/exception @@ -31,8 +31,6 @@ #ifndef __EXCEPTION__ #define __EXCEPTION__ -#pragma interface "exception" - extern "C++" { namespace std @@ -41,7 +39,7 @@ namespace std { public: exception() throw() { } - virtual ~exception() throw() { } + virtual ~exception() throw(); virtual const char* what() const throw(); }; @@ -49,7 +47,7 @@ namespace std { public: bad_exception() throw() { } - virtual ~bad_exception() throw() { } + virtual ~bad_exception() throw(); }; typedef void (*terminate_handler) (); diff --git a/libstdc++-v3/libsupc++/exception_support.cc b/libstdc++-v3/libsupc++/exception_support.cc index ae62e5321da..48adafa4ab9 100644 --- a/libstdc++-v3/libsupc++/exception_support.cc +++ b/libstdc++-v3/libsupc++/exception_support.cc @@ -29,8 +29,6 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -#pragma implementation "exception" - #include "typeinfo" #include "exception" #include @@ -377,6 +375,14 @@ std::uncaught_exception() throw() return p && ! p->caught; } +std::exception::~exception() throw() { } + +std::bad_exception::~bad_exception() throw() { } + const char* std::exception::what() const throw() { return typeid (*this).name (); } + + + + diff --git a/libstdc++-v3/libsupc++/new b/libstdc++-v3/libsupc++/new index 87c9d712f37..56cc1833fe8 100644 --- a/libstdc++-v3/libsupc++/new +++ b/libstdc++-v3/libsupc++/new @@ -31,7 +31,6 @@ #ifndef __NEW__ #define __NEW__ -#pragma interface "new" #include #include @@ -42,7 +41,8 @@ namespace std class bad_alloc : public exception { public: - virtual const char* what() const throw() { return "bad_alloc"; } + bad_alloc() throw() { } + virtual ~bad_alloc() throw(); }; struct nothrow_t { }; diff --git a/libstdc++-v3/libsupc++/new_handler.cc b/libstdc++-v3/libsupc++/new_handler.cc index a6cf2a2a3fb..8c1628f4f71 100644 --- a/libstdc++-v3/libsupc++/new_handler.cc +++ b/libstdc++-v3/libsupc++/new_handler.cc @@ -28,7 +28,6 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -#pragma implementation "new" #include "new" const std::nothrow_t std::nothrow = { }; @@ -43,3 +42,5 @@ std::set_new_handler (new_handler handler) __new_handler = handler; return prev_handler; } + +std::bad_alloc::~bad_alloc() throw() { } diff --git a/libstdc++-v3/libsupc++/tinfo.cc b/libstdc++-v3/libsupc++/tinfo.cc index 1d0c5058939..732609cf048 100644 --- a/libstdc++-v3/libsupc++/tinfo.cc +++ b/libstdc++-v3/libsupc++/tinfo.cc @@ -27,8 +27,6 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -#pragma implementation "typeinfo" - #include #include "tinfo.h" #include "new" // for placement new @@ -41,6 +39,9 @@ std::type_info:: ~type_info () { } +std::bad_cast::~bad_cast() throw() { } +std::bad_typeid::~bad_typeid() throw() { } + #if !__GXX_MERGED_TYPEINFO_NAMES // We can't rely on common symbols being shared between shared objects. diff --git a/libstdc++-v3/libsupc++/typeinfo b/libstdc++-v3/libsupc++/typeinfo index bffe042a73a..8d8133b6a5c 100644 --- a/libstdc++-v3/libsupc++/typeinfo +++ b/libstdc++-v3/libsupc++/typeinfo @@ -30,8 +30,6 @@ #ifndef __TYPEINFO__ #define __TYPEINFO__ -#pragma interface "typeinfo" - #include extern "C++" { @@ -118,14 +116,14 @@ namespace std { public: bad_cast() throw() { } - virtual ~bad_cast() throw() { } + virtual ~bad_cast() throw(); }; class bad_typeid : public exception { public: bad_typeid () throw() { } - virtual ~bad_typeid () throw() { } + virtual ~bad_typeid () throw(); }; } // namespace std -- 2.30.2