tests: Remove exception specifications

Exception specifications are a deprecated feature in C++11 and gcc 7
complains about these specifications. Hence remove these specifications.
This patch avoids that gcc reports the following:
    
  warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16360
This commit is contained in:
Bart Van Assche 2017-05-11 03:07:11 +00:00
parent 4782f8c4c1
commit 2393a4c5ca
2 changed files with 7 additions and 7 deletions

View File

@ -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);
}

View File

@ -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");