Commit a1e1bc90 by Jonathan Wakely Committed by Jonathan Wakely

container.cc: Do not use uninitialized members in mem-initializers.

	* 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.

From-SVN: r209432
parent 3a0f3672
......@@ -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,
......
......@@ -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) { }
};
// { 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()
......
......@@ -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>
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment