mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 01:51:29 +00:00
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:
parent
4782f8c4c1
commit
2393a4c5ca
@ -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);
|
||||
}
|
||||
|
||||
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user