base: exception specification for operator delete

Clang is rather picky about this and prints the following warning when
compiling new_delete.cc:

  error: function previously declared with an explicit exception
  specification redeclared with an implicit exception specification
  [-Werror,-Wimplicit-exception-spec-mismatch]

Issue #3938
This commit is contained in:
Piotr Tworek 2020-08-28 00:04:18 +02:00 committed by Christian Helmuth
parent 53a990579b
commit 81a49bffee

View File

@ -67,7 +67,7 @@ void operator delete (void *ptr, Deallocator &dealloc) { try_dealloc(ptr, deall
* implementation of the 'stdcxx' library instead. To make this possible, the
* 'delete (void *)' implementation in the 'cxx' library must be 'weak'.
*/
__attribute__((weak)) void operator delete (void *)
__attribute__((weak)) void operator delete (void *) noexcept
{
Genode::error("cxx: operator delete (void *) called - not implemented. "
"A working implementation is available in the 'stdcxx' library.");