JDK-8233530 : gcc 5.4 build warning -Wc++14-compat after JDK-8233359
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-11-04
  • Updated: 2024-04-10
  • Resolved: 2019-11-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14 b22Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
When building on Ubuntu 16.04 using gcc5.4.0 (the stock compiler), after JDK-8233359 we 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() {
      ^

-Wc++14-compat is enabled by -Wall, as is -Wc++11-compat (and Wc++17-compat in sufficiently recent versions of gcc).

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/cc5ac592b9e5 User: stuefe Date: 2019-11-05 16:00:01 +0000
05-11-2019

Not sure why this warning doesn't happen with some other versions of gcc. No warnings with gcc8.3, for example.
04-11-2019