OSDN Git Service

PR libstdc++/54297
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 26 Aug 2012 14:09:12 +0000 (14:09 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 26 Aug 2012 14:09:12 +0000 (14:09 +0000)
* src/c++11/future.cc (~_Async_state_common): Move to...
* src/c++11/compatibility-thread-c++0x.cc (~_Async_state_common):
Here.
(_GLIBCXX_ABI_COMPAT_ASYNC): Rename to _GLIBCXX_ASYNC_ABI_COMPAT.
* include/std/future (_GLIBCXX_ABI_COMPAT_ASYNC): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@190687 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/future
libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc
libstdc++-v3/src/c++11/future.cc

index 01a16e8..5228aa7 100644 (file)
@@ -1,4 +1,13 @@
 2012-08-26  Jonathan Wakely  <jwakely.gcc@gmail.com>
 2012-08-26  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       PR libstdc++/54297
+       * src/c++11/future.cc (~_Async_state_common): Move to...
+       * src/c++11/compatibility-thread-c++0x.cc (~_Async_state_common):
+       Here.
+       (_GLIBCXX_ABI_COMPAT_ASYNC): Rename to _GLIBCXX_ASYNC_ABI_COMPAT.
+       * include/std/future (_GLIBCXX_ABI_COMPAT_ASYNC): Likewise.
+
+2012-08-26  Jonathan Wakely  <jwakely.gcc@gmail.com>
            Geoff Romer  <gromer@google.com>
 
        PR libstdc++/54351
            Geoff Romer  <gromer@google.com>
 
        PR libstdc++/54351
index d8554f8..22fd36a 100644 (file)
@@ -1425,7 +1425,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   class __future_base::_Async_state_common : public __future_base::_State_base
   {
   protected:
   class __future_base::_Async_state_common : public __future_base::_State_base
   {
   protected:
-#if defined(_GLIBCXX_HAVE_TLS) && defined(_GLIBCXX_ABI_COMPAT_ASYNC)
+#ifdef _GLIBCXX_ASYNC_ABI_COMPAT
     ~_Async_state_common();
 #else
     ~_Async_state_common() = default;
     ~_Async_state_common();
 #else
     ~_Async_state_common() = default;
index cc8761e..e5c7eec 100644 (file)
 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 // <http://www.gnu.org/licenses/>.
 
 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 // <http://www.gnu.org/licenses/>.
 
+#include <bits/c++config.h>
+#if defined(_GLIBCXX_HAVE_TLS) && defined(PIC)
+#define _GLIBCXX_ASYNC_ABI_COMPAT
+#endif
+
 #include <future>
 #include <mutex>
 
 #ifndef __GXX_EXPERIMENTAL_CXX0X__
 #include <future>
 #include <mutex>
 
 #ifndef __GXX_EXPERIMENTAL_CXX0X__
-# error "compatibility-c++0x.cc must be compiled with -std=gnu++0x"
+# error "compatibility-thread-c++0x.cc must be compiled with -std=gnu++0x"
 #endif
 
 #define _GLIBCXX_ASM_SYMVER(cur, old, version) \
 #endif
 
 #define _GLIBCXX_ASM_SYMVER(cur, old, version) \
@@ -70,3 +75,23 @@ _GLIBCXX_ASM_SYMVER(_ZN9__gnu_cxx11try_to_lockE, _ZSt11try_to_lock, GLIBCXX_3.4.
 
 #endif
 #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
 
 #endif
 #endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
+
+
+// XXX GLIBCXX_ABI Deprecated
+// gcc-4.7.0
+// <future> export changes
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
+  && (ATOMIC_INT_LOCK_FREE > 1)
+#if defined(_GLIBCXX_HAVE_TLS) && defined(PIC)
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+  __future_base::_Async_state_common::~_Async_state_common() { _M_join(); }
+
+  // Explicit instantiation due to -fno-implicit-instantiation.
+  template void call_once(once_flag&, void (thread::*&&)(), reference_wrapper<thread>&&);
+  template _Bind_simple_helper<void (thread::*)(), reference_wrapper<thread>>::__type __bind_simple(void (thread::*&&)(), reference_wrapper<thread>&&);
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace std
+#endif
+#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
index eaea393..0552537 100644 (file)
@@ -22,8 +22,6 @@
 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 // <http://www.gnu.org/licenses/>.
 
 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 // <http://www.gnu.org/licenses/>.
 
-#define _GLIBCXX_ABI_COMPAT_ASYNC
-
 #include <future>
 
 namespace
 #include <future>
 
 namespace
@@ -86,15 +84,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   __future_base::_Result_base::~_Result_base() = default;
 
   __future_base::_State_base::~_State_base() = default;
   __future_base::_Result_base::~_Result_base() = default;
 
   __future_base::_State_base::~_State_base() = default;
-
-#ifdef _GLIBCXX_HAVE_TLS
-  // Exported for compatibility with ABI version 3.4.17
-  __future_base::_Async_state_common::~_Async_state_common() { _M_join(); }
-
-  // Explicit instantiation due to -fno-implicit-instantiation.
-  template void call_once(once_flag&, void (thread::*&&)(), reference_wrapper<thread>&&);
-  template _Bind_simple_helper<void (thread::*)(), reference_wrapper<thread>>::__type __bind_simple(void (thread::*&&)(), reference_wrapper<thread>&&);
-#endif
 #endif
 
 _GLIBCXX_END_NAMESPACE_VERSION
 #endif
 
 _GLIBCXX_END_NAMESPACE_VERSION