diff options
author | Jonathan Wakely <jwakely.gcc@gmail.com> | 2012-06-15 00:27:29 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2012-06-15 01:27:29 +0100 |
commit | ea154879335580a7d35b8a8db58afbf40199166d (patch) | |
tree | 9d0af1b9e8f97f66a395e321f921010a834e8e18 | |
parent | e48c9c3e05858e4e8f508b4afbe33067b1beb2dd (diff) | |
download | gcc-ea154879335580a7d35b8a8db58afbf40199166d.zip gcc-ea154879335580a7d35b8a8db58afbf40199166d.tar.gz gcc-ea154879335580a7d35b8a8db58afbf40199166d.tar.bz2 |
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
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/concurrence.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/std/mutex | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 24543a0..0aeb6c0 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +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 diff --git a/libstdc++-v3/include/ext/concurrence.h b/libstdc++-v3/include/ext/concurrence.h index 22c433b..25e218b 100644 --- a/libstdc++-v3/include/ext/concurrence.h +++ b/libstdc++-v3/include/ext/concurrence.h @@ -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); } diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex index a7ebace..34d64c5 100644 --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -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; |