summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-09 08:58:33 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-09 08:58:33 +0000
commit718affe25d78d0e18b9c35ca25348c1ffaf1729a (patch)
tree6ee601ded83d4fe7b691e53061a78a56524ccec4 /libstdc++-v3/include
parent0ccbd52484034c8fe8e155d55deb860a05719a32 (diff)
downloadgcc-718affe25d78d0e18b9c35ca25348c1ffaf1729a.tar.gz
2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
* doc/invoke.texi ([Wnarrowing]): Update for non-constants in C++11. gcc/cp 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com> * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change return type to bool; in C++11 for constants give errors, not pedwarns. * cp-tree.h (check_narrowing): Adjust declaration. * call.c (convert_like_real): Update calls. * semantics.c (finish_compound_literal): Likewise. gcc/testsuite 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/cpp0x/Wnarrowing1.C: Adjust for errors. * g++.dg/cpp0x/enum29.C: Adjust. /libstdc++-v3 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com> * include/ext/pod_char_traits.h (char_traits<__gnu_cxx:: character<_Value, _Int, _St> >::eof): Fix vs narrowing conversion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213776 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/ext/pod_char_traits.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/include/ext/pod_char_traits.h b/libstdc++-v3/include/ext/pod_char_traits.h
index e027585e704..d6de298a90f 100644
--- a/libstdc++-v3/include/ext/pod_char_traits.h
+++ b/libstdc++-v3/include/ext/pod_char_traits.h
@@ -177,7 +177,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static int_type
eof()
{
- int_type __r = { -1 };
+ int_type __r = { static_cast<typename __gnu_cxx::__conditional_type
+ <std::__is_integer<int_type>::__value,
+ int_type, int>::__type>(-1) };
return __r;
}