|
From: <sv...@va...> - 2017-05-11 03:07:18
|
Author: bart
Date: Thu May 11 04:07:11 2017
New Revision: 16360
Log:
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]
Modified:
trunk/massif/tests/overloaded-new.cpp
trunk/memcheck/tests/new_override.cpp
Modified: trunk/massif/tests/overloaded-new.cpp
==============================================================================
--- trunk/massif/tests/overloaded-new.cpp (original)
+++ trunk/massif/tests/overloaded-new.cpp Thu May 11 04:07:11 2017
@@ -14,32 +14,32 @@
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);
}
Modified: trunk/memcheck/tests/new_override.cpp
==============================================================================
--- trunk/memcheck/tests/new_override.cpp (original)
+++ trunk/memcheck/tests/new_override.cpp Thu May 11 04:07:11 2017
@@ -7,7 +7,7 @@
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");
|