Message ID | 20240706201808.193336-1-jwakely@redhat.com |
---|---|
State | New |
Headers | show |
Series | [committed] libstdc++: Restore support for including <name.h> in extern "C" [PR115797] | expand |
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index a31de2ee4ab..c39a3792537 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -62,6 +62,8 @@ #define __glibcxx_want_void_t #include <bits/version.h> +extern "C++" +{ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -4111,6 +4113,7 @@ template<typename _Ret, typename _Fn, typename... _Args> _GLIBCXX_END_NAMESPACE_VERSION } // namespace std +} // extern "C++" #endif // C++11 diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/linkage.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/linkage.cc index c43384efbaa..1825801cec9 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/linkage.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++2011/linkage.cc @@ -15,8 +15,7 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-options "-std=gnu++11" } -// { dg-do compile } +// { dg-do compile { target c++11 } } // libstdc++/69386