Commit ea154879 by Jonathan Wakely Committed by Jonathan Wakely

re PR libstdc++/53578 (include/ext/concurrence.h relies on ill-formed narrowing conversions)

	PR libstdc++/53578
	* include/ext/concurrence.h (__recursive_mutex::_S_destroy): Fix
	narrowing conversion.
	* include/std/mutex (__recursive_mutex_base::_S_destroy): Likewise.

From-SVN: r188646
parent e48c9c3e
2012-06-15 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/53578
* include/ext/concurrence.h (__recursive_mutex::_S_destroy): Fix
narrowing conversion.
* include/std/mutex (__recursive_mutex_base::_S_destroy): Likewise.
2012-06-14 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/53270
......
......@@ -284,7 +284,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// matches a gthr-win32.h recursive mutex
template<typename _Rm>
static typename __enable_if<sizeof(&_Rm::sema), void>::__type
static typename __enable_if<(bool)sizeof(&_Rm::sema), void>::__type
_S_destroy(_Rm* __mx)
{
__gthread_mutex_t __tmp;
......@@ -293,7 +293,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// matches a recursive mutex with a member 'actual'
template<typename _Rm>
static typename __enable_if<sizeof(&_Rm::actual), void>::__type
static typename __enable_if<(bool)sizeof(&_Rm::actual), void>::__type
_S_destroy(_Rm* __mx)
{ __gthread_mutex_destroy(&__mx->actual); }
......
......@@ -116,13 +116,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// matches a recursive mutex with a member 'actual'
template<typename _Rm>
static typename enable_if<sizeof(&_Rm::actual), void>::type
static typename enable_if<(bool)sizeof(&_Rm::actual), void>::type
_S_destroy(_Rm* __mx)
{ __gthread_mutex_destroy(&__mx->actual); }
// matches a gthr-win32.h recursive mutex
template<typename _Rm>
static typename enable_if<sizeof(&_Rm::sema), void>::type
static typename enable_if<(bool)sizeof(&_Rm::sema), void>::type
_S_destroy(_Rm* __mx)
{
__gthread_mutex_t __tmp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment