From e363c939cb507a00eab85c0cd441ee98a5f3a7fb Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 16 Mar 2017 17:22:47 +0000 Subject: [PATCH] PR libstdc++/79980 fix target type of cast PR libstdc++/79980 * src/c++11/codecvt.cc (to_integer(codecvt_mode)): Fix target type. From-SVN: r246205 --- libstdc++-v3/ChangeLog | 3 +++ libstdc++-v3/src/c++11/codecvt.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index cf94ab538e3..d035d91ab13 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2017-03-16 Jonathan Wakely + PR libstdc++/79980 + * src/c++11/codecvt.cc (to_integer(codecvt_mode)): Fix target type. + PR libstdc++/80041 * src/c++11/codecvt.cc (__codecvt_utf16_base::do_out) (__codecvt_utf16_base::do_in): Convert char arguments to diff --git a/libstdc++-v3/src/c++11/codecvt.cc b/libstdc++-v3/src/c++11/codecvt.cc index ef38267e855..02866efe5fa 100644 --- a/libstdc++-v3/src/c++11/codecvt.cc +++ b/libstdc++-v3/src/c++11/codecvt.cc @@ -34,7 +34,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // The standard doesn't define these operators, which is annoying. static underlying_type::type to_integer(codecvt_mode m) - { return static_cast(m); } + { return static_cast::type>(m); } static codecvt_mode& operator&=(codecvt_mode& m, codecvt_mode n) { return m = codecvt_mode(to_integer(m) & to_integer(n)); } -- 2.30.2