diff --git a/massif/tests/overloaded-new.cpp b/massif/tests/overloaded-new.cpp index 6c61d8e1d..8fb87078b 100644 --- a/massif/tests/overloaded-new.cpp +++ b/massif/tests/overloaded-new.cpp @@ -14,32 +14,32 @@ typedef struct { int array[1000]; } s; -__attribute__((noinline)) void* operator new (std::size_t n) throw (std::bad_alloc) +__attribute__((noinline)) void* operator new (std::size_t n) { return malloc(n); } -__attribute__((noinline)) void* operator new (std::size_t n, std::nothrow_t const &) throw () +__attribute__((noinline)) void* operator new (std::size_t n, std::nothrow_t const &) { return malloc(n); } -__attribute__((noinline)) void* operator new[] (std::size_t n) throw (std::bad_alloc) +__attribute__((noinline)) void* operator new[] (std::size_t n) { return malloc(n); } -__attribute__((noinline)) void* operator new[] (std::size_t n, std::nothrow_t const &) throw () +__attribute__((noinline)) void* operator new[] (std::size_t n, std::nothrow_t const &) { return malloc(n); } -__attribute__((noinline)) void operator delete (void* p) throw() +__attribute__((noinline)) void operator delete (void* p) { return free(p); } -__attribute__((noinline)) void operator delete[] (void* p) throw() +__attribute__((noinline)) void operator delete[] (void* p) { return free(p); } diff --git a/memcheck/tests/new_override.cpp b/memcheck/tests/new_override.cpp index 200173617..f462a9ccc 100644 --- a/memcheck/tests/new_override.cpp +++ b/memcheck/tests/new_override.cpp @@ -7,7 +7,7 @@ public: int a, b, c, d; }; -void *operator new[](size_t size) throw(std::bad_alloc) +void *operator new[](size_t size) { void *ret = malloc(size); printf("Here.\n");