OSDN Git Service

PR libstdc++/49894
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 5 Nov 2011 13:33:29 +0000 (13:33 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 5 Nov 2011 13:33:29 +0000 (13:33 +0000)
PR bootstrap/50982
* include/std/mutex (once_flag): Use NSDMI.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181013 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/mutex

index 470c0c1..1d9c379 100644 (file)
@@ -1,3 +1,9 @@
+2011-11-05  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       PR libstdc++/49894
+       PR bootstrap/50982
+       * include/std/mutex (once_flag): Use NSDMI.
+
 2011-11-04  Benjamin Kosnik  <bkoz@redhat.com>
 
        * scripts/run_doxygen: Fix sed quoting.
index 4d154ff..321a332 100644 (file)
@@ -760,11 +760,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
   private:
     typedef __gthread_once_t __native_type;
-    __native_type  _M_once;
+    __native_type  _M_once = __GTHREAD_ONCE_INIT;
 
   public:
     /// Constructor
-    constexpr once_flag() noexcept : _M_once(__GTHREAD_ONCE_INIT) { }
+    constexpr once_flag() noexcept = default;
 
     /// Deleted copy constructor
     once_flag(const once_flag&) = delete;