8233530: gcc 5.4 build warning -Wc++14-compat after JDK-8233359
authorstuefe
Tue, 05 Nov 2019 16:57:58 +0100
changeset 58934 cc5ac592b9e5
parent 58932 8623f75be895
child 58936 f4b1addb9742
8233530: gcc 5.4 build warning -Wc++14-compat after JDK-8233359 Reviewed-by: dholmes, goetz
src/hotspot/share/memory/operator_new.cpp
--- a/src/hotspot/share/memory/operator_new.cpp	Tue Nov 05 11:53:46 2019 +0100
+++ b/src/hotspot/share/memory/operator_new.cpp	Tue Nov 05 16:57:58 2019 +0100
@@ -89,6 +89,12 @@
   fatal("Should not call global delete []");
 }
 
+#ifdef __GNUG__
+// Warning disabled for gcc 5.4
+PRAGMA_DIAG_PUSH
+PRAGMA_DISABLE_GCC_WARNING("-Wc++14-compat")
+#endif // __GNUG__
+
 void operator delete(void* p, size_t size) throw() {
   fatal("Should not call global sized delete");
 }
@@ -97,4 +103,8 @@
   fatal("Should not call global sized delete []");
 }
 
+#ifdef __GNUG__
+PRAGMA_DIAG_POP
+#endif // __GNUG__
+
 #endif // Non-product