summaryrefslogtreecommitdiff
path: root/gcc/cp/inc
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1997-11-20 23:17:48 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1997-11-20 23:17:48 +0000
commit4b7a79e2c768aa851aaae9728a0af4f4bc47ae09 (patch)
tree8acaf8c513b3b690a0f58c9e47a4fb5b1c0154d0 /gcc/cp/inc
parent3807c59ed2f09b24eb938536596f5e9ac2ca9553 (diff)
downloadgcc-4b7a79e2c768aa851aaae9728a0af4f4bc47ae09.tar.gz
./:
* Makefile.in (LIB2FUNCS): Remove C++ memory management support. * libgcc2.c: Remove __builtin_new, __builtin_vec_new, set_new_handler, __builtin_delete, and __builtin_vec_delete. * except.c (output_exception_table): Don't bother with __EXCEPTION_END__. cp/: * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs. (various.o): Likewise. * inc/new: Add placement deletes. Add throw specs for default new. * new.cc (set_new_handler): Move here from libgcc2. * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler. (new): Move from libgcc2. Throw bad_alloc. * new2.cc: Move the rest of the op news and op deletes from libgcc2. * decl.c (init_decl_processing): Update exception specs on new and delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16617 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/inc')
-rw-r--r--gcc/cp/inc/new16
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/cp/inc/new b/gcc/cp/inc/new
index f4b0b975cdb..23fe6eb9e6b 100644
--- a/gcc/cp/inc/new
+++ b/gcc/cp/inc/new
@@ -22,23 +22,21 @@ namespace std {
struct nothrow_t {};
extern const nothrow_t nothrow;
typedef void (*new_handler)();
- extern "C" new_handler set_new_handler (new_handler);
+ new_handler set_new_handler (new_handler);
#if 0
} // namespace std
#endif
-// G++ implementation internals
-extern new_handler __new_handler;
-extern "C" void __default_new_handler (void);
-
// replaceable signatures
-void *operator new (size_t);
-void *operator new (size_t, const nothrow_t&) throw();
-void *operator new[] (size_t);
-void *operator new[] (size_t, const nothrow_t&) throw();
+void *operator new (size_t) throw (std::bad_alloc);
+void *operator new[] (size_t) throw (std::bad_alloc);
void operator delete (void *) throw();
void operator delete[] (void *) throw();
+void *operator new (size_t, const nothrow_t&) throw();
+void *operator new[] (size_t, const nothrow_t&) throw();
+void operator delete (void *, const nothrow_t&) throw();
+void operator delete[] (void *, const nothrow_t&) throw();
// default placement versions of operator new
inline void *operator new(size_t, void *place) throw() { return place; }