This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] libstdc++/69386 Ensure C++ language linkage in cmath and cstdlib
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 Jan 2016 13:39:47 +0000
- Subject: Re: [patch] libstdc++/69386 Ensure C++ language linkage in cmath and cstdlib
- Authentication-results: sourceware.org; auth=none
- References: <20160108191852 dot GN30323 at redhat dot com> <20160119214359 dot GL15084 at redhat dot com> <20160120123440 dot GO15084 at redhat dot com>
On 20/01/16 12:34 +0000, Jonathan Wakely wrote:
--- a/libstdc++-v3/include/c_global/ccomplex
+++ b/libstdc++-v3/include/c_global/ccomplex
@@ -35,6 +35,8 @@
# include <bits/c++0x_warning.h>
#endif
+extern "C++" {
#include <complex>
+}
P.S. I would have preferred not to do this around <complex> and add
the linkage specification inside <complex>, but that would also mean
adding it inside <sstream>, which includes the entire iostream
hierarchy and <string> and bits/stl_algobase.h and lots of other
headers. Maybe I'll clean that up in stage 1 but it's a big patch.