summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/mutex
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-04 14:35:54 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-04 14:35:54 +0000
commitdd2160c7486c1a3625aa2f2ba8a28ed755d00b45 (patch)
tree19079e098a5fc22be162b78aa1635d8deb69379b /libstdc++-v3/include/std/mutex
parentaf761b0069f0ccc8832e67f0b553f93467686735 (diff)
downloadgcc-dd2160c7486c1a3625aa2f2ba8a28ed755d00b45.tar.gz
2008-09-04 Chris Fairles <chris.fairles@gmail.com>
* include/std/mutex (once_flag): Construct __gthread_once_t in a temporary variable before assigning to _M_once to avoid initialization errors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139986 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/mutex')
-rw-r--r--libstdc++-v3/include/std/mutex6
1 files changed, 4 insertions, 2 deletions
diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex
index 5e6ba9c2715..e4ceaf2aac8 100644
--- a/libstdc++-v3/include/std/mutex
+++ b/libstdc++-v3/include/std/mutex
@@ -615,8 +615,10 @@ namespace std
typedef __gthread_once_t __native_type;
once_flag()
- : _M_once(__GTHREAD_ONCE_INIT)
- { }
+ {
+ __gthread_once_t __tmp = __GTHREAD_ONCE_INIT;
+ _M_once = __tmp;
+ }
once_flag(const once_flag&) = delete;
once_flag& operator=(const once_flag&) = delete;