This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin] Add c++14 sized deallocation operator
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 23 Mar 2016 10:58:42 -0000
- Subject: [newlib-cygwin] Add c++14 sized deallocation operator
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=93c13ec6cc5e46eac9ba2571f9e5c3d1cee91d2e
commit 93c13ec6cc5e46eac9ba2571f9e5c3d1cee91d2e
Author: Peter Foley <pefoley2@pefoley.com>
Date: Sat Mar 19 13:45:55 2016 -0400
Add c++14 sized deallocation operator
When compiling with -std=c++14 (the default for gcc 6.0+), the sized
deallocation operator must be defined to prevent undefined symbols when
linking.
winsup/cygwin/ChangeLog:
cxx.cc (operator delete(void *p, size_t)): Define.
Signed-off-by: Peter Foley <pefoley2@pefoley.com>
Diff:
---
winsup/cygwin/cxx.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/winsup/cygwin/cxx.cc b/winsup/cygwin/cxx.cc
index 0faeaf7..df7491b 100644
--- a/winsup/cygwin/cxx.cc
+++ b/winsup/cygwin/cxx.cc
@@ -29,6 +29,11 @@ operator delete (void *p)
{
free (p);
}
+void
+operator delete (void *p, size_t)
+{
+ ::operator delete(p);
+}
void *
operator new[] (std::size_t s)