diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-15 19:05:52 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-15 19:05:52 +0000 |
commit | 7a86b887a922457156e77841e7ff7d727c1087e4 (patch) | |
tree | f69f632f9b6b602886e82684b855fdc81d428ffa /libstdc++-v3 | |
parent | f8d58828323a495d0b79b0081da93f8a4573a0ac (diff) | |
download | gcc-7a86b887a922457156e77841e7ff7d727c1087e4.tar.gz |
* testsuite/24_iterators/insert_iterator/requirements/container.cc: Do
not use uninitialized members in mem-initializers.
* testsuite/ext/throw_value/cons.cc: Fix most vexing parse.
* testsuite/util/testsuite_common_types.h: Update comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209432 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
4 files changed, 13 insertions, 7 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a2b73964521..1a40f204700 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -49,6 +49,11 @@ * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/3.cc: Likewise. + * testsuite/24_iterators/insert_iterator/requirements/container.cc: Do + not use uninitialized members in mem-initializers. + * testsuite/ext/throw_value/cons.cc: Fix most vexing parse. + * testsuite/util/testsuite_common_types.h: Update comment. + 2014-04-14 Jonathan Wakely <jwakely@redhat.com> * include/bits/stl_vector.h (_Vector_base::_Vector_impl, diff --git a/libstdc++-v3/testsuite/24_iterators/insert_iterator/requirements/container.cc b/libstdc++-v3/testsuite/24_iterators/insert_iterator/requirements/container.cc index 9aea7c92b26..162a16e2984 100644 --- a/libstdc++-v3/testsuite/24_iterators/insert_iterator/requirements/container.cc +++ b/libstdc++-v3/testsuite/24_iterators/insert_iterator/requirements/container.cc @@ -26,9 +26,9 @@ // Check data member 'container' accessible. class test_dm : public std::insert_iterator<std::list<int> > { - container_type l; - container_type::iterator i; + container_type& l(); + container_type::iterator i(); container_type* p; public: - test_dm(): std::insert_iterator<std::list<int> >(l, i), p(container) { } + test_dm(): std::insert_iterator<std::list<int> >(l(), i()), p(container) { } }; diff --git a/libstdc++-v3/testsuite/ext/throw_value/cons.cc b/libstdc++-v3/testsuite/ext/throw_value/cons.cc index 40e67a83220..c6689752f65 100644 --- a/libstdc++-v3/testsuite/ext/throw_value/cons.cc +++ b/libstdc++-v3/testsuite/ext/throw_value/cons.cc @@ -1,4 +1,4 @@ -// { dg-options "-std=gnu++0x" } +// { dg-options "-std=gnu++11" } // Copyright (C) 2009-2014 Free Software Foundation, Inc. // @@ -24,8 +24,8 @@ void foo1() { typedef __gnu_cxx::throw_value_limit value_type; value_type v1; - value_type v2(v2); - value_type v3(value_type()); + value_type v2{v1}; + value_type v3{value_type()}; } bool foo2() diff --git a/libstdc++-v3/testsuite/util/testsuite_common_types.h b/libstdc++-v3/testsuite/util/testsuite_common_types.h index 63339ef877b..abf6ea92ba7 100644 --- a/libstdc++-v3/testsuite/util/testsuite_common_types.h +++ b/libstdc++-v3/testsuite/util/testsuite_common_types.h @@ -689,7 +689,8 @@ namespace __gnu_test struct _Concept; // NB: _Tp must be a literal type. - // Have to have user-defined default ctor for this to work. + // Have to have user-defined default ctor for this to work, + // or implicit default ctor must initialize all members. template<typename _Tp> struct _Concept<_Tp, true> { |