RFR: 8233359: Add global sized operator delete definitions
Thomas Stüfe
thomas.stuefe at gmail.com
Mon Nov 4 19:17:10 UTC 2019
Hi,
I now get:
/shared/projects/openjdk/jdk-jdk/source/src/hotspot/share/memory/operator_new.cpp:92:6:
error: 'void operator delete(void*, size_t)' is a usual (non-placement)
deallocation function in C++14 (or with -fsized-deallocation)
[-Werror=c++14-compat]
void operator delete(void* p, size_t size) throw() {
^
/shared/projects/openjdk/jdk-jdk/source/src/hotspot/share/memory/operator_new.cpp:96:6:
error: 'void operator delete [](void*, size_t)' is a usual (non-placement)
deallocation function in C++14 (or with -fsized-deallocation)
[-Werror=c++14-compat]
void operator delete [](void* p, size_t size) throw() {
^
when building on Ubuntu 16.4 using gcc 5.4.0.
This used to build without problems on Ubuntu 16.4 with the stock compiler.
This is really a pain :(
..Thomas
On Fri, Nov 1, 2019 at 6:32 AM Kim Barrett <kim.barrett at oracle.com> wrote:
> > On Nov 1, 2019, at 1:07 AM, David Holmes <david.holmes at oracle.com>
> wrote:
> >
> > Hi Kim,
> >
> > That looks fine and trivial IMO.
>
> Thanks.
>
> >
> > Thanks,
> > David
> >
> > On 1/11/2019 11:15 am, Kim Barrett wrote:
> >> Please review this addition of replacement implementations for the
> >> global sized deallocation functions that were added by C++14.
> >> Since Visual Studio 2017 or later always provides C++14 or later, we
> >> should be including these when using those compiler versions.
> >> We also need these definitions when doing experimental C++14 builds
> >> with gcc (in preparation for JEP 347), to avoid -Wsized-deallocation
> >> warnings (enabled by the recent addition of -Wextra).
> >> Rather than trying to determine whether the definitions are needed or
> >> not, we add them unconditionally. It's harmless to provide such
> >> definitions in non-product builds for pre-C++14 compilers; they just
> >> won't ever be called.
> >> CR:
> >> https://bugs.openjdk.java.net/browse/JDK-8233359
> >> Webrev:
> >> https://cr.openjdk.java.net/~kbarrett/8233359/open.00/
> >> Testing:
> >> mach5 tier1
>
>
>
More information about the hotspot-runtime-dev
mailing list