Skip to content
Snippets Groups Projects
Commit 3d5cb2c9 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

build experiment: lets use GNU -s solution for handling C++ standard's throw...

build experiment: lets use GNU -s solution for handling C++ standard's throw related changes (needs to be tested on many platforms)

Signed-off-by: default avatarKristof Szabados <Kristof.Szabados@ericsson.com>
parent c1d96b4d
No related branches found
No related tags found
No related merge requests found
...@@ -18,23 +18,23 @@ ...@@ -18,23 +18,23 @@
static void *dummy = NULL; static void *dummy = NULL;
void *operator new(size_t size) throw (std::bad_alloc) void *operator new(size_t size) _GLIBCXX_THROW (std::bad_alloc)
{ {
return Malloc(size); return Malloc(size);
} }
void *operator new[](size_t size) throw (std::bad_alloc) void *operator new[](size_t size) _GLIBCXX_THROW (std::bad_alloc)
{ {
if (size == 0) return &dummy; if (size == 0) return &dummy;
else return Malloc(size); else return Malloc(size);
} }
void operator delete(void *ptr) throw() void operator delete(void *ptr) _GLIBCXX_USE_NOEXCEPT
{ {
Free(ptr); Free(ptr);
} }
void operator delete[](void *ptr) throw() void operator delete[](void *ptr) _GLIBCXX_USE_NOEXCEPT
{ {
if (ptr != (void*)&dummy) Free(ptr); if (ptr != (void*)&dummy) Free(ptr);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment