Description
C++14 added global sized operator delete functions:
void operator delete(void* p, size_t size) throw();
void operator delete [](void* p, size_t size) throw();
These functions are replaceable, just like the other allocation and deallocation functions.
In non-product builds, memory/operator_new.cpp provides replacement definitions that call fatal(), to help prevent forbidden use by HotSpot code. (There is also a link-time check in the build system.)
To support C++14 we should provide similar definitions for the new sized deallocation functions. Since we're already using C++14 when building with Visual Studio 2017 or later, we ought to provide such definitions now, at least for that platform. And we need them when doing experimental C++14 builds with gcc, else we get -Wsized-deallocation warnings (enabled by the recent addition of -Wextra).
void operator delete(void* p, size_t size) throw();
void operator delete [](void* p, size_t size) throw();
These functions are replaceable, just like the other allocation and deallocation functions.
In non-product builds, memory/operator_new.cpp provides replacement definitions that call fatal(), to help prevent forbidden use by HotSpot code. (There is also a link-time check in the build system.)
To support C++14 we should provide similar definitions for the new sized deallocation functions. Since we're already using C++14 when building with Visual Studio 2017 or later, we ought to provide such definitions now, at least for that platform. And we need them when doing experimental C++14 builds with gcc, else we get -Wsized-deallocation warnings (enabled by the recent addition of -Wextra).
Attachments
Issue Links
- relates to
-
JDK-8233724 Remove -Wc++14-compat warning suppression in operator_new.cpp
-
- Resolved
-
-
JDK-8233530 gcc 5.4 build warning -Wc++14-compat after JDK-8233359
-
- Resolved
-
-
JDK-8208089 JEP 347: Enable C++14 Language Features
-
- Closed
-