cxx: define delete operator with alignm. arg

Using 'alignas' in declarations might cause GCC to request for an
implementation of 'operator delete(void*, unsigned long, std::align_val_t)'
although it might actually never be called. This commit adds a dummy
implementation to 'cxx/new_delete.cc' that does nothing more than printing an
error to the log that a proper implementation is missing. This approach is
coherent with our treatment of other global delete operators.

Ref #4217
This commit is contained in:
Martin Stein
2021-08-31 13:07:30 +02:00
committed by Norman Feske
parent ebd140cacb
commit f1b72d0281

View File

@@ -73,8 +73,16 @@ __attribute__((weak)) void operator delete (void *) noexcept
"A working implementation is available in the 'stdcxx' library.");
}
__attribute__((weak)) void operator delete (void *, unsigned long)
{
Genode::error("cxx: operator delete (void *, unsigned long) called - not implemented. "
"A working implementation is available in the 'stdcxx' library.");
}
__attribute__((weak)) void operator delete (void *, unsigned long, std::align_val_t)
{
Genode::error("cxx: operator delete (void *, unsigned long, std::align_val_t) called - not implemented. "
"A working implementation is available in the 'stdcxx' library.");
}