aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/c_global
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2016-01-20 12:34:25 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2016-01-20 12:34:25 +0000
commiteac437bf2c5ec74c7fd4a3e897207e6b7a5eabb2 (patch)
tree1ba9352b867531b18d3df6af746f3167e7cf14d8 /libstdc++-v3/include/c_global
parent825da0d20f71cd82fa58e16e92099879e9a8b8f2 (diff)
downloadgcc-eac437bf2c5ec74c7fd4a3e897207e6b7a5eabb2.zip
gcc-eac437bf2c5ec74c7fd4a3e897207e6b7a5eabb2.tar.gz
gcc-eac437bf2c5ec74c7fd4a3e897207e6b7a5eabb2.tar.bz2
Ensure C++ language linkage in cmath and cstdlib
PR libstdc++/69386 * include/c_global/ccomplex: Ensure C++ language linkage. * include/c_global/cmath: Likewise. * include/c_global/cstdlib: Likewise. * include/c_global/ctgmath: Likewise. * testsuite/17_intro/headers/c++2011/linkage.cc: New. From-SVN: r232607
Diffstat (limited to 'libstdc++-v3/include/c_global')
-rw-r--r--libstdc++-v3/include/c_global/ccomplex2
-rw-r--r--libstdc++-v3/include/c_global/cmath4
-rw-r--r--libstdc++-v3/include/c_global/cstdlib4
-rw-r--r--libstdc++-v3/include/c_global/ctgmath2
4 files changed, 12 insertions, 0 deletions
diff --git a/libstdc++-v3/include/c_global/ccomplex b/libstdc++-v3/include/c_global/ccomplex
index 8879e20..df2e413 100644
--- 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>
+}
#endif
diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath
index 45e40ab3..c4ee3f5 100644
--- a/libstdc++-v3/include/c_global/cmath
+++ b/libstdc++-v3/include/c_global/cmath
@@ -74,6 +74,8 @@
#undef tan
#undef tanh
+extern "C++"
+{
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -1790,4 +1792,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
# include <bits/specfun.h>
#endif
+} // extern "C++"
+
#endif
diff --git a/libstdc++-v3/include/c_global/cstdlib b/libstdc++-v3/include/c_global/cstdlib
index 44b6e5c..1ba5fb7 100644
--- a/libstdc++-v3/include/c_global/cstdlib
+++ b/libstdc++-v3/include/c_global/cstdlib
@@ -115,6 +115,8 @@ namespace std
#undef wcstombs
#undef wctomb
+extern "C++"
+{
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -272,6 +274,8 @@ namespace std
#endif // _GLIBCXX_USE_C99_STDLIB
+} // extern "C++"
+
#endif // !_GLIBCXX_HOSTED
#endif
diff --git a/libstdc++-v3/include/c_global/ctgmath b/libstdc++-v3/include/c_global/ctgmath
index 2fee958..4314516 100644
--- a/libstdc++-v3/include/c_global/ctgmath
+++ b/libstdc++-v3/include/c_global/ctgmath
@@ -35,7 +35,9 @@
# include <bits/c++0x_warning.h>
#else
# include <cmath>
+extern "C++" {
# include <complex>
+}
#endif
#endif