This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin] cxx.cc: Disable C++14 warning for new sized delete operator
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 23 Mar 2016 10:58:47 -0000
- Subject: [newlib-cygwin] cxx.cc: Disable C++14 warning for new sized delete operator
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=117737a7fa6c8611d049f74dd9407ba5ab1ca425
commit 117737a7fa6c8611d049f74dd9407ba5ab1ca425
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Wed Mar 23 11:58:21 2016 +0100
cxx.cc: Disable C++14 warning for new sized delete operator
As long as we're not building in C++14 mode, the definition of the
sized delete operator results in a compatibility warning.
* cxx.cc (operator delete): Disable C++14 warning for sized variant.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/cxx.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/winsup/cygwin/cxx.cc b/winsup/cygwin/cxx.cc
index df7491b..ea78e75 100644
--- a/winsup/cygwin/cxx.cc
+++ b/winsup/cygwin/cxx.cc
@@ -29,11 +29,15 @@ operator delete (void *p)
{
free (p);
}
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++14-compat"
void
operator delete (void *p, size_t)
{
::operator delete(p);
}
+#pragma GCC diagnostic pop
void *
operator new[] (std::size_t s)