summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2017-03-16 17:22:47 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2017-03-16 17:22:47 +0000
commitd8d81a4a58b7dd897f988c4fb980a50018dba6ad (patch)
treeaad3acf575aea33cc9571400be47e0a358a02066 /libstdc++-v3
parentf187ad6cd2104d7b84c0c48513b0faa985405ae7 (diff)
downloadgcc-d8d81a4a58b7dd897f988c4fb980a50018dba6ad.tar.gz
PR libstdc++/79980 fix target type of cast
PR libstdc++/79980 * src/c++11/codecvt.cc (to_integer(codecvt_mode)): Fix target type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246205 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog3
-rw-r--r--libstdc++-v3/src/c++11/codecvt.cc2
2 files changed, 4 insertions, 1 deletions
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 <jwakely@redhat.com>
+ 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<wchar_t>::do_out)
(__codecvt_utf16_base<wchar_t>::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<codecvt_mode>::type
to_integer(codecvt_mode m)
- { return static_cast<mode_t>(m); }
+ { return static_cast<underlying_type<codecvt_mode>::type>(m); }
static codecvt_mode& operator&=(codecvt_mode& m, codecvt_mode n)
{ return m = codecvt_mode(to_integer(m) & to_integer(n)); }