Commit Graph

7218 Commits

Author SHA1 Message Date
Ramana Radhakrishnan dd38693ee5 Use atomics in guard.cc / remove special casing in targets.
The PowerPC, AIX, Alpha, IA64  implementations of atomic_word.h are in no
way different from what can be achieved with the generic rewrite in
Patch 1 of this series - delete these.

2015-06-12  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

        * config/cpu/alpha/atomic_word.h: Remove.
        * config/cpu/ia64/atomic_word.h: Remove.
        * config/cpu/powerpc/atomic_word.h: Remove.
        * config/os/aix/atomic_word.h: Remove.
        * configure.host (atomic_word_dir) [ia64, aix*, powerpc, alpha]:
        Use generic definition.

From-SVN: r224412
2015-06-12 09:53:24 +00:00
Ramana Radhakrishnan 57e6d9be77 Use atomics in guard.cc.
This provides proper definitions for _GLIBCXX_READ_MEM_BARRIER and
_GLIBCXX_WRITE_MEM_BARRIER, rewrites the guards in terms of proper
atomic extensions and removes internal uses of
_GLIBCXX_READ_MEM_BARRIER and _GLIBCXX_WRITE_MEM_BARRIER and replaces
them with equivalent atomics.

2015-06-12  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/66200
	PR c++/66192
	* * config/cpu/generic/atomic_word.h (_GLIBCXX_READ_MEM_BARRIER): Define
        (_GLIBCXX_WRITE_MEM_BARRIER): Likewise
        * include/bits/shared_ptr_base.h: Use ACQ_REL barrier.
        * include/ext/atomicity.h: Likewise.
        * include/tr1/shared_ptr.h: Likewise.
        * libsupc++/guard.cc (__test_and_acquire): Rewrite with atomics.
        Update comment.
        (__set_and_release): Likewise.
        * testsuite/20_util/shared_ptr/cons/43820_neg.cc (test01): Adjust for
	line numbers.
        * testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
        * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
	Likewise.

From-SVN: r224411
2015-06-12 09:49:41 +00:00
Jonathan Wakely 7672ab25db tuple (__is_tuple_like_impl): Disambiguate array in debug and profile modes.
* include/std/tuple (__is_tuple_like_impl): Disambiguate array in
	debug and profile modes.
	* testsuite/25_algorithms/headers/algorithm/synopsis.cc: Adjust tests
	for swap in C++11 and later.

From-SVN: r224397
2015-06-12 00:22:19 +01:00
Jonathan Wakely 8602ca0a2d re PR libstdc++/66030 ([5.1.0] std::codecvt_byname missing from libstdc++ DLL)
PR libstdc++/66030
	* config/abi/pre/gnu.ver: Export codecvt_byname and codecvt symbols
	for mingw32.

From-SVN: r224273
2015-06-09 09:50:00 +01:00
Jonathan Wakely c00f4f5fb3 re PR libstdc++/66441 (wstring_convert not working correctly)
PR libstdc++/66441
	* testsuite/22_locale/conversions/string/66441.cc: New.
	* include/bits/locale_conv.h (__do_str_codecvt): Reserve enough space
	in the output string for BOM and complete result.

From-SVN: r224222
2015-06-08 14:03:45 +01:00
Jonathan Wakely aa4e0c43bc re PR libstdc++/66417 (std::codecvt_utf16<char32_t, 0x10FFFF, std::codecvt_mode::generate_header> generates incorrect output)
PR libstdc++/66417
	* src/c++11/codecvt.cc (write_utf16_code_point): Use adjust_byte_order
	for single UTF-16 units.
	* testsuite/22_locale/codecvt/codecvt_utf16/66417.cc: New.

From-SVN: r224217
2015-06-08 12:09:17 +01:00
François Dumont d7b35f22be stl_tree.h (_Rb_tree<>::__is_transparent<>): Move to outer scope and rename to ...
2015-06-07  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/stl_tree.h (_Rb_tree<>::__is_transparent<>): Move to
	outer scope and rename to ...
	(std::__hash_is_transparent<>): ... this.
	* include/debug/stl_map.h (map::find<>,
	map::lower_bound<>, map::upper_bound<>, map::equal_range<>): New
	member function templates to perform heterogeneous lookup.
	* include/debug/stl_multimap.h (multimap::find<>,
	multimap::lower_bound<>, multimap::upper_bound<>,
	multimap::equal_range<>): Likewise.
	* include/debug/stl_multiset.h (multiset::find<>,
	multiset::lower_bound<>, multiset::upper_bound<>,
	multiset::equal_range<>): Likewise.
	* include/debug/stl_set.h (set::find<>,
	set::lower_bound<>, set::upper_bound<>, set::equal_range<>): Likewise.
	* include/profile/stl_map.h (map::find<>, map::count<>,
	map::lower_bound<>, map::upper_bound<>, map::equal_range<>): Likewise.
	* include/profile/stl_multimap.h (multimap::find<>, multimap::count<>,
	multimap::lower_bound<>, multimap::upper_bound<>,
	multimap::equal_range<>): Likewise.
	* include/profile/stl_multiset.h (multiset::find<>, multiset::count<>,
	multiset::lower_bound<>, multiset::upper_bound<>,
	multiset::equal_range<>): Likewise.
	* include/profile/stl_set.h (set::find<>, set::count<>,
	set::lower_bound<>, set::upper_bound<>, set::equal_range<>): Likewise.
	* testsuite/23_containers/map/operations/1.cc: Check const variants.
	* testsuite/23_containers/multimap/operations/1.cc: Likewise.
	* testsuite/23_containers/multiset/operations/1.cc: Likewise.
	* testsuite/23_containers/set/operations/1.cc: Likewise.

From-SVN: r224200
2015-06-07 20:45:57 +00:00
Jonathan Wakely 46ba128114 status_cxx2017.xml: Update status tables.
* doc/xml/manual/status_cxx2017.xml: Update status tables.
	* doc/html/manual/*: Regenerate.
	* include/std/type_traits (bool_constant): Define.
	* testsuite/20_util/bool_constant/requirements.cc: New.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
	Likewise.

From-SVN: r224160
2015-06-05 18:17:53 +01:00
Jonathan Wakely 712266515f shared_mutex (__shared_mutex_pthread, [...]): New helper types implementing the shared mutex requirements.
* include/std/shared_mutex (__shared_mutex_pthread,
	__shared_mutex_cv): New helper types implementing the shared mutex
	requirements.
	(shared_mutex): New type for C++17.
	(shared_timed_mutex): Derive from one of the new helper types.
	* testsuite/30_threads/shared_mutex/cons/1.cc: New.
	* testsuite/30_threads/shared_mutex/cons/assign_neg.cc: New.
	* testsuite/30_threads/shared_mutex/cons/copy_neg.cc: New.
	* testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
	New.
	* testsuite/30_threads/shared_mutex/try_lock/1.cc: New.
	* testsuite/30_threads/shared_mutex/try_lock/2.cc: New.

From-SVN: r224158
2015-06-05 17:31:05 +01:00
Jonathan Wakely 9bbcf8b85b Fix date of ChangeLog entry.
From-SVN: r224155
2015-06-05 17:00:04 +01:00
Ville Voutilainen ddb63209a8 Add __is_nothrow_swappable and take it into use.
2015-06-04  Ville Voutilainen  <ville.voutilainen@gmail.com>

	Add __is_nothrow_swappable and take it into use.
	* include/bits/algorithmfwd.h (swap): Only declare for C++98 mode.
	* include/bits/move.h (swap): Add constraints in C++11 and later.
	* include/bits/stl_pair.h (swap): Use __is_nothrow_swappable
	for the free swap function for pair.
	* include/bits/stl_queue.h (swap): Use __is_nothrow_swappable
	for the free swap functions for queue and priority_queue.
	* include/bits/stl_stack.h (swap): Use __is_nothrow_swappable
	for the free swap function for stack.
	* include/debug/array (swap): Use __is_nothrow_swappable
	for the free swap function for array.
	* include/profile/array (swap): Likewise.
	* include/std/array (swap): Likewise.
	* include/std/tuple (_Tuple_impl::_M_swap): Use __is_nothrow_swappable.
	* include/std/type_traits (__is_swappable_impl::__is_swappable,
	__is_nothrow_swappable_impl, __is_nothrow_swappable): New.
	* testsuite/20_util/is_nothrow_swappable/requirements/
	explicit_instantiation.cc: New.
	* testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
	New.
	* testsuite/20_util/is_nothrow_swappable/value.cc: New.

From-SVN: r224153
2015-06-05 15:44:26 +01:00
François Dumont 82b544ad25 2015-06-03 François Dumont fdumont@gcc.gnu.org>
* testsuite/23_containers/list/61347.cc: Add dg-require-normal-mode.

From-SVN: r224100
2015-06-03 20:15:35 +00:00
Jonathan Wakely 5211a52d57 abi.xml: Document versioning for 5.1.0 release.
* doc/xml/manual/abi.xml: Document versioning for 5.1.0 release.
	* doc/html/manual/*: Regenerate.

From-SVN: r224025
2015-06-02 12:17:43 +01:00
Jonathan Wakely 5d65efd4df lwg-active.html: Update to R93.
* doc/html/ext/lwg-active.html: Update to R93.
	* doc/html/ext/lwg-closed.html: Likewise.
	* doc/html/ext/lwg-defects.html: Likewise.
	* doc/html/manual/*: Regenerate.
	* doc/xml/manual/intro.xml: Document status of several DRs.

From-SVN: r224023
2015-06-02 12:07:30 +01:00
Renlin Li fc7e20fd7a [libstdc++-v3]Add _GLIBCXX_HAVE_LIMIT_FSIZE to guard 27_io/fpos/14775.cc.
libstdc++-v3/

2015-06-02  Renlin Li  <renlin.li@arm.com>

	* testsuite/27_io/fpos/14775.cc: Add _GLIBCXX_HAVE_LIMIT_FSIZE check.

From-SVN: r224015
2015-06-02 08:54:25 +00:00
Jonathan Wakely 77d0ed47e8 libstdc++.exp (libstdc++_init): Unset LANGUAGE environment variable.
* testsuite/lib/libstdc++.exp (libstdc++_init): Unset LANGUAGE
	environment variable.

From-SVN: r223937
2015-06-01 12:57:33 +01:00
Jonathan Wakely 5d946f4228 re PR libstdc++/66354 ([UBSAN] stl_algobase.h:708:7: runtime error: null pointer passed as argument)
PR libstdc++/66354
	* include/bits/stl_algobase.h (__fill_a): Check length before calling
	memset.

From-SVN: r223906
2015-05-31 23:42:17 +01:00
Jonathan Wakely 12fc64ac3a stl_algobase.h (__equal<true>::equal): Check length instead of checking for null pointers.
* include/bits/stl_algobase.h (__equal<true>::equal): Check length
	instead of checking for null pointers.
	(__lexicographical_compare<true>::__lc): Only check shorter length.

From-SVN: r223886
2015-05-30 12:44:02 +01:00
François Dumont adad2a7d90 2015-05-29 François Dumont fdumont@gcc.gnu.org>
* include/debug/debug.h (_GLIBCXX_DEBUG_ASSERT,
	_GLIBCXX_DEBUG_PEDASSERT, _GLIBCXX_DEBUG_ONLY): Move definition...
	* include/debug/assertions.h: ...here, new.
	* include/debug/formatter.h
	(_Error_formatter::_Is_iterator_value_type): New.
	(_Error_formatter::_Is_instance): New.
	(_Error_formatter::_Parameter): Make public and not friend anymore.
	(_Error_formatter::_Parameter::__instance): New _M_kind enum entry.
	(_Error_formatter::_Parameter::__iterator_value_type): New _M_kind enum
	entry.
	(_Error_formatter::_Parameter::_Type): New.
	(_Error_formatter::_Parameter::_Instance): New, inherit from
	latter.
	(union _Error_formatter::_Parameter::_M_variant): Reorganize.
	(_Parameter(_Iterator const&, const char*, _Is_iterator)): Make all
	overloads take iterator through a const reference.
	(_Parameter(const _Iterator&, const char*, _Is_iterator_value_type)):
	New.
	(_Parameter(const _Type&, const char*, _Is_instance)): New.
	(_Error_formatter::_M_print_type): Delete.
	(_Error_formatter::_M_iterator_value_type): New.
	(_Error_formatter::_M_instance): New.
	* include/Makefile.am: Add new above debug file.
	* include/Makefile.in: Regenerate.
	* include/debug/functions.h
	(__check_dereferenceable(const _Safe_iterator<>&),
	__valid_range(const _Safe_iterator<>&),
	__is_safe_random_iterator<_Safe_iterator<>>): Move...
	* include/debug/safe_iterator.h: ... here.
	Replace debug.h include with assertions.h.
	(__check_singular_aux): Move...
	* include/debug/safe_base.h: ... here.
	* include/debug/functions.h
	(__check_dereferenceable(const _Safe_local_iterator<>&),
	__valid_range(const _Safe_local_iterator<>&): Move...
	* include/debug/safe_local_iterator.h: ...here.
	* include/debug/safe_sequence.h: Replace debug.h with assertions.h.
	Remove _Safe_iterator declaration.
	* include/debug/safe_unordered_container.h: Replace debug.h with
	assertions.h.
	* include/debug/array: Replace safe_sequence.h include with
	formatter.h and macros.h.
	* include/debug/deque: Include functions.tcc.
	* include/debug/forward_list: Likewise.
	* include/debug/list: Likewise.
	* include/debug/string: Likewise.
	* include/debug/vector: Likewise.
	* include/bits/unique_ptr.h: Replace debug.h include with new
	assertions.h.
	* include/bits/stl_iterator_base_funcs.h: Likewise.
	* testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
	Adjust dg-error line number.
	* testsuite/23_containers/array/tuple_interface/
	tuple_element_debug_neg.cc: Likewise.
	* src/c++11/debug.cc: Adapt.

From-SVN: r223877
2015-05-29 21:29:07 +00:00
Jonathan Wakely cfba236af0 status_cxx2017.xml: Fix duplicate ID attribute.
* doc/xml/manual/status_cxx2017.xml: Fix duplicate ID attribute.
	* doc/html/manual/*: Regenerate.

From-SVN: r223868
2015-05-29 16:18:05 +01:00
Jonathan Wakely 75eb64433e future (__async_result_of): New alias template.
* include/std/future (__async_result_of): New alias template.
	(async): Use __async_result_of to pass decayed types to result_of.
	* testsuite/30_threads/async/lwg2021.cc: New.
	* doc/xml/manual/intro.xml: Document LWG 2021 status.

From-SVN: r223866
2015-05-29 14:44:52 +01:00
Jonathan Wakely 6759eddee4 re PR libstdc++/66327 (-fsanitize=nonnull-attribute errors in stl_algobase.h)
PR libstdc++/66327
	* include/bits/stl_algobase.h (__equal<true>::equal): Do not call
	memcmp with null pointers.
	(__lexicographical_compare<true>::__lc): Do not call memcmp for empty
	ranges.

From-SVN: r223865
2015-05-29 14:28:54 +01:00
Jonathan Wakely ac3efa775f re PR libstdc++/65352 (array<T,0>::begin()/end() etc. forms a null reference and breaks on clang+ubsan)
PR libstdc++/65352
	* include/profile/array (array::data): Use _S_ptr.
	* include/debug/array (array::data): Likewise.

From-SVN: r223838
2015-05-28 17:00:09 +01:00
Jonathan Wakely 6a344b953a re PR libstdc++/65352 (array<T,0>::begin()/end() etc. forms a null reference and breaks on clang+ubsan)
PR libstdc++/65352
	* include/std/array (__array_traits::_S_ptr): New function.
	(array::data): Use _S_ptr to avoid creating invalid reference.
	* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust
	dg-error line numbers.
	* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
	likewise.

From-SVN: r223806
2015-05-28 12:53:35 +01:00
Jonathan Wakely 151fbaac5c stl_tree.h (_Rb_tree::_M_end()): Return _Base_ptr instead of downcasting.
* include/bits/stl_tree.h (_Rb_tree::_M_end()): Return _Base_ptr
	instead of downcasting.
	(_Rb_tree::_M_copy): Change second parameter to _Base_ptr.
	(_Rb_tree::_M_lower_bound, _Rb_tree:_M_upper_bound): Likewise.
	(_Rb_tree::_S_iter): Remove.
	(_Rb_tree::_S_lower_bound_tr, _Rb_tree::_S_upper_bound_tr): Remove.
	(_Rb_tree::_M_find_tr(const _Kt&) const): Call _M_lower_bound_tr
	instead of _S_lower_bound_tr
	(_Rb_tree::_M_find_tr(const _Kt&)): Call const overload.
	(_Rb_tree::_M_lower_bound_tr(const _Kt&) const): Do the search here
	instead of calling _S_lower_bound_tr.
	(_Rb_tree::_M_lower_bound_tr(const _Kt&)): Call const overload.
	(_Rb_tree::_M_upper_bound_tr(const _Kt&) const): Do the search here
	instead of calling _S_upper_bound_tr.
	(_Rb_tree::_M_upper_bound_tr(const _Kt&)): Call const overload.
	(_Rb_tree::_M_equal_range_tr(const _Kt&)): Likewise.
	(_Rb_tree::equal_range): Use _Base_ptr for end pointer.
	(_Rb_tree::_M_get_insert_unique_pos): Likewise.
	(_Rb_tree::_M_get_insert_equal_pos): Likewise.
	(_Rb_tree::_M_insert_equal_lower_node): Likewise.
	(_Rb_tree::_M_insert_unique, _Rb_tree::_M_emplace_unique,
	_Rb_tree::_M_emplace_hint_unique): Remove static_cast.

From-SVN: r223746
2015-05-27 12:18:44 +01:00
Jonathan Wakely 2097b5b029 re PR libstdc++/66017 (Undefined behaviour in std::set<long long>)
PR libstdc++/66017
	* include/bits/stl_tree.h (_Rb_tree_node): Use __aligned_membuf.
	(_Rb_tree_iterator, _Rb_tree_const_iterator): Support construction
	from _Base_ptr.
	(_Rb_tree_const_iterator::_M_const_cast): Remove static_cast.
	(_Rb_tree::begin, _Rb_tree::end): Remove static_cast.
	* include/ext/aligned_buffer.h (__aligned_membuf): New type using
	alignment of _Tp as a member subobject, not as a complete object.
	* python/libstdcxx/v6/printers.py (StdRbtreeIteratorPrinter): Lookup
	_Link_type manually as it might not be in the debug info.

From-SVN: r223745
2015-05-27 12:18:37 +01:00
Doug Evans 419587a0bb xmethods.py (UniquePtrMethodsMatcher): Add operator-> support.
* python/libstdcxx/v6/xmethods.py (UniquePtrMethodsMatcher): Add
	operator-> support.
	* testsuite/libstdc++-xmethods/unique_ptr.cc: Add tests for
	operator->.

From-SVN: r223723
2015-05-26 23:06:55 +00:00
Jonathan Wakely 4a72a6ddd2 locale_conv.h: Fix copyright years.
* include/bits/locale_conv.h: Fix copyright years.
	* include/bits/quoted_string.h: Likewise.
	* src/filesystem/Makefile.am: Likewise.
	* testsuite/22_locale/conversions/buffer/1.cc: Likewise.
	* testsuite/22_locale/conversions/buffer/requirements/typedefs.cc:
	Likewise.
	* testsuite/22_locale/conversions/string/1.cc: Likewise.
	* testsuite/22_locale/conversions/string/2.cc: Likewise.
	* testsuite/22_locale/conversions/string/3.cc: Likewise.
	* testsuite/22_locale/conversions/string/requirements/typedefs-2.cc:
	Likewise.
	* testsuite/22_locale/conversions/string/requirements/typedefs.cc:
	Likewise.
	* testsuite/util/testsuite_fs.h: Likewise.

From-SVN: r223676
2015-05-26 10:52:25 +01:00
François Dumont e2897e23a7 2015-05-23 François Dumont fdumont@gcc.gnu.org>
PR libstdc++/64657
	* include/debug/functions.h (__check_sorted_aux): Cast expression to
	void.

From-SVN: r223605
2015-05-23 11:17:38 +00:00
David Edelsohn e3592e196a re PR target/66224 (PowerPC _GLIBCXX_READ_MEM_BARRIER too weak)
PR target/66224
        * config/cpu/powerpc/atomic_word.h (_GLIBCXX_READ_MEM_BARRIER):
        Don't use isync. Use lwsync if available.
        * configure.host (atomic_word_dir) [aix[56789]*]: Delete to use
        powerpc cpu definition.

From-SVN: r223496
2015-05-21 13:18:25 -04:00
Jason Merrill 4177264e09 del_opv.cc: Suppress -Wsized-deallocation.
* libsupc++/del_opv.cc: Suppress -Wsized-deallocation.
	* libsupc++/del_op.cc: Likewise.

From-SVN: r223488
2015-05-21 11:12:40 -04:00
François Dumont fa5cc2db54 formatter.h (_GLIBCXX_TYPEID): New macro to simplify usage of typeid.
2015-05-20  François Dumont  <fdumont@gcc.gnu.org>

	* include/debug/formatter.h (_GLIBCXX_TYPEID): New macro to simplify
	usage of typeid.
	(_Error_formatter::_M_print_type): New.
	* src/c++11/debug.cc
	(_Error_formatter::_Parameter::_M_print_field): Use latter.
	(_Error_formatter::_M_print_type): Implement latter using
	__cxaabiv1::__cxa_demangle to print demangled type name.

From-SVN: r223455
2015-05-20 19:44:25 +00:00
François Dumont fd2ef11714 2015-05-20 François Dumont <fdumont@gcc.gnu.org>
* include/bits/cpp_type_traits.h
	(std::move_iterator): Delete declaration.
	(std::__is_move_iterator<move_iterator>): Move partial specialization...
	* include/bits/stl_iterator.h: ... here.
	(std::__miter_base): Overloads for std::reverse_iterator and
	std::move_iterator.
	* include/bits/stl_algobase.h (std::__miter_base): Provide default
	implementation.

From-SVN: r223453
2015-05-20 19:02:22 +00:00
Jonathan Wakely 7769c9deff * testsuite/util/testsuite_fs.h (nonexistent_path): Don't use tempnam.
From-SVN: r223450
2015-05-20 18:28:04 +01:00
Jonathan Wakely 793cac74e9 re PR libstdc++/66078 (20_util/specialized_algorithms/uninitialized_copy/808590.cc fails with -std=c++11)
PR libstdc++/66078
	* include/bits/stl_iterator.h (__make_move_if_noexcept_iterator): Add
	overload for pointers.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy/
	808590.cc: Add -std=gnu++03 switch.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy/
	808590-cxx11.cc: Copy of 808590.cc to test with -std=gnu++11.
	* testsuite/23_containers/vector/modifiers/push_back/
	strong_guarantee.cc: New.

From-SVN: r223449
2015-05-20 18:11:03 +01:00
Jonathan Wakely 8e72571637 stl_list.h (_M_resize_pos(size_type&)): Declare.
* include/bits/stl_list.h (_M_resize_pos(size_type&)): Declare.
	(operator==(const list&, const list&)): If size() is O(1) compare
	sizes before comparing each element.
	* include/bits/list.tcc (list::_M_resize_pos(size_type&)): Define.
	(list::resize): Use _M_resize_pos.

From-SVN: r223416
2015-05-19 23:24:50 +01:00
François Dumont 90f0d17641 66055.cc: Add constructor invocations.
2015-05-19  François Dumont  <fdumont@gcc.gnu.org>

	* testsuite/23_containers/unordered_map/cons/66055.cc: Add constructor
	invocations.
	* testsuite/23_containers/unordered_multimap/cons/66055.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/cons/66055.cc: Likewise.
	* testsuite/23_containers/unordered_set/cons/66055.cc: Likewise.

From-SVN: r223413
2015-05-19 19:57:09 +00:00
Ramana Radhakrishnan 49c6543450 Add cpu_defines.h for ARM.
2015-05-17  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	* configure.host: Define cpu_defines_dir for ARM.
	* config/cpu/arm/cpu_defines.h: New file.

From-SVN: r223361
2015-05-19 12:47:50 +00:00
François Dumont e55b80f5f4 unordered_map.h (unordered_map, [...]): Add missing constructors.
2015-05-17  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/unordered_map.h (unordered_map, unordered_multimap): Add
	missing constructors.
	* include/bits/unordered_set.h (unordered_set, unordered_multiset):
	Likewise.
	* include/debug/unordered_map (unordered_map, unordered_multimap): Add
	missing constructors.
	* include/debug/unordered_set (unordered_set, unordered_multiset):
	Likewise.
	* include/profile/unordered_map (unordered_map, unordered_multimap): Add
	missing constructors.
	* include/profile/unordered_set (unordered_set, unordered_multiset):
	Likewise.
	* testsuite/23_containers/unordered_map/cons/66055.cc: Add constructor
	invocations.
	* testsuite/23_containers/unordered_multimap/cons/66055.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/cons/66055.cc: Likewise.
	* testsuite/23_containers/unordered_set/cons/66055.cc: Likewise.

From-SVN: r223273
2015-05-17 20:14:53 +00:00
Jonathan Wakely 9caf7b2729 ops.cc (stat_type): Define alias for struct stat and use throughout the file.
* src/filesystem/ops.cc (stat_type): Define alias for struct stat and
	use throughout the file.
	(make_file_type): New function.
	(file_size(const path&, error_code&)): Report an error for anything
	that isn't a regular file.
	(status(const path&), symlink_status(const path&)): Do not throw for
	file_type::not_found.
	(temp_directory_path()): Check additional environment variables.
	* testsuite/experimental/filesystem/operations/exists.cc: New.
	* testsuite/experimental/filesystem/operations/file_size.cc: New.
	* testsuite/experimental/filesystem/operations/status.cc: New.
	* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
	New.

From-SVN: r223224
2015-05-15 19:37:25 +01:00
Nathan Myers ddbd742bf8 re PR libstdc++/66055 (hash containers missing required reserving constructors)
2015-05-14  Nathan Myers  <ncm@cantrip.org>
	    Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/66055
	* include/std/unordered_map (unordered_map, unordered_multimap): Add
	missing constructors.
	* include/std/unordered_set (unordered_set, unordered_multiset):
	Likewise.
	* testsuite/23_containers/unordered_map/cons/66055.cc: New.
	* testsuite/23_containers/unordered_multimap/cons/66055.cc: New.
	* testsuite/23_containers/unordered_multiset/cons/66055.cc: New.
	* testsuite/23_containers/unordered_set/cons/66055.cc: New.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>

From-SVN: r223198
2015-05-14 14:47:19 +01:00
Jonathan Wakely a0c4531ccf re PR libstdc++/66011 (call to '__open_missing_mode' declared with attribute error)
PR libstdc++/66011
	* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for fchmod and
	sendfile.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* src/filesystem/ops.cc (do_copy_file): Fix arguments to open(). Do
	not return after copying contents. Use fchmod, fchmodat, and sendfile
	when available.
	(current_path, permissions, space): Use errno not return value.

From-SVN: r223196
2015-05-14 14:23:14 +01:00
Jonathan Wakely 0b9fc9fee8 re PR libstdc++/66018 (opendir configure test not working when GCC_NO_EXECUTABLES)
PR libstdc++/66018
	* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for struct
	dirent.d_type.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (AC_STRUCT_DIRENT_D_TYPE): Remove.

From-SVN: r223194
2015-05-14 12:47:19 +01:00
Eric Botcazou 9b92a9f3b6 sjlj.m4: New file.
config/
	* sjlj.m4: New file.
libgcc/
	* configure.ac: Include config/sjlj.m4.
	Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust.
	* config.in: Regenerate.
	* configure: Likewise.
	* config.host: Replace enable_sjlj_exceptions by ac_cv_sjlj_exceptions.
libjava/
	* configure.ac: Include config/sjlj.m4.
	Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust.
	* include/config.h.in: Regenerate.
	* configure: Likewise.
	* exception.cc: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__.
	* stacktrace.cc: Likewise.
	* include/default-signal.h: Likewise.
	* sysdep/i386/backtrace.h: Likewise.
libobjc/
	* configure.ac: Remove manual SJLJ check.
	* config.h.in: Regenerate.
	* configure: Likewise.
	* exception.c: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__.
libstdc++-v3/
	* acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Delete.
	* configure.ac: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS.
	* config.h.in: Regenerate.
	* configure: Likewise.
	* libsupc++/eh_personality.cc: Replace _GLIBCXX_SJLJ_EXCEPTIONS by
	__USING_SJLJ_EXCEPTIONS__.
	* libsupc++/eh_throw.cc: Likewise.
	* libsupc++/eh_ptr.cc: Likewise.
	* doc/html/manual/appendix_porting.html: Remove
	GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
	* doc/xml/manual/build_hacking.xml: Likewise.
	* doc/html/manual/configure.html: Remove --enable-sjlj-exceptions.
	* doc/xml/manual/configure.xml: Likewise.

From-SVN: r223181
2015-05-13 21:15:31 +00:00
Jonathan Wakely 098aac94ef shared_ptr_base.h (__shared_count(unique_ptr&&)): Check for nullptr (LWG 2415).
* include/bits/shared_ptr_base.h (__shared_count(unique_ptr&&)): Check
	for nullptr (LWG 2415).
	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc: Test
	construction from empty unique_ptr.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error.
	* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.

From-SVN: r223170
2015-05-13 17:42:18 +01:00
Jonathan Wakely 49d50b6b8f stl_raw_storage_iter.h (raw_storage_iterator::base()): Define (LWG 2454).
* include/bits/stl_raw_storage_iter.h (raw_storage_iterator::base()):
	Define (LWG 2454).
	* testsuite/20_util/raw_storage_iterator/base.cc: New.

From-SVN: r223162
2015-05-13 14:54:46 +01:00
Jonathan Wakely e6508eaf69 future (packaged_task(allocator_arg_t, const A&, F&&): Remove explicit (LWG 2407).
* include/std/future (packaged_task(allocator_arg_t, const A&, F&&):
	Remove explicit (LWG 2407).

From-SVN: r223161
2015-05-13 14:54:40 +01:00
Jonathan Wakely bcb896abe8 basic_string.h (basic_string::basic_string()): Make noexcept conditional on allocator (LWG 2455).
* include/bits/basic_string.h (basic_string::basic_string()): Make
	noexcept conditional on allocator (LWG 2455).

From-SVN: r223160
2015-05-13 14:32:36 +01:00
Jonathan Wakely d0cad9fef0 * include/std/complex (polar): Check for negative rho (LWG 2459).
From-SVN: r223159
2015-05-13 14:32:31 +01:00
Jonathan Wakely ac68f97cfe tuple (apply): Handle pointers to member (LWG 2418).
* include/experimental/tuple (apply): Handle pointers to member (LWG
	2418).
	* include/std/functional (_Mem_fn_base): Make constructors constexpr.
	(_Maybe_wrap_member_pointer::__do_wrap): Make constexpr.
	* testsuite/experimental/tuple/apply.cc: Test pointer to member.

From-SVN: r223158
2015-05-13 14:12:48 +01:00
Jonathan Wakely 9933eb862e * include/bits/random.h (seed_seq): More noexcept (LWG 2440).
From-SVN: r223155
2015-05-13 13:21:52 +01:00
Jonathan Wakely 32e6a60e3a alloc_traits.h (_S_max_size): Implement LWG 2466.
* include/bits/alloc_traits.h (_S_max_size): Implement LWG 2466.
	* testsuite/20_util/allocator_traits/members/max_size.cc: Adjust.
	* testsuite/23_containers/forward_list/allocator/minimal.cc:
	Likewise.
	* testsuite/23_containers/map/allocator/minimal.cc: Likewise.
	* testsuite/23_containers/multimap/allocator/minimal.cc: Likewise.
	* testsuite/23_containers/multiset/allocator/minimal.cc: Likewise.
	* testsuite/23_containers/set/allocator/minimal.cc: Likewise.
	* testsuite/23_containers/unordered_map/allocator/minimal.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/allocator/minimal.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/allocator/minimal.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/allocator/minimal.cc:
	Likewise.
	* testsuite/util/testsuite_allocator.h: Remove unused parameter.

From-SVN: r223154
2015-05-13 13:21:45 +01:00
Jonathan Wakely 32ff3768b1 acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Re-enable on solaris.
* acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Re-enable on solaris.
	* configure: Regenerate.

From-SVN: r223136
2015-05-13 12:07:38 +01:00
Michael Haubenwallner 6ef9367656 libstdc++: Bump to automake 1.11.6
2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>

	* Makefile.in: Regenerated with automake-1.11.6.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* doc/Makefile.in: Likewise.
	* include/Makefile.in: Likewise.
	* libsupc++/Makefile.in: Likewise.
	* po/Makefile.in: Likewise.
	* python/Makefile.in: Likewise.
	* src/Makefile.in: Likewise.
	* src/c++11/Makefile.in: Likewise.
	* src/c++98/Makefile.in: Likewise.
	* src/filesystem/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.

From-SVN: r223125
2015-05-13 10:51:03 +00:00
Jason Merrill 839473d010 synopsis.cc: Add _GLIBCXX14_CONSTEXPR.
* testsuite/20_util/headers/functional/synopsis.cc: Add
	_GLIBCXX14_CONSTEXPR.
	* testsuite/25_algorithms/headers/algorithm/synopsis.cc: Likewise.

From-SVN: r222975
2015-05-09 20:46:12 -04:00
Jason Merrill f8356d52f2 std_c++0x_neg.cc: Add -std=c++98.
* testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc: Add -std=c++98.
	* testsuite/20_util/auto_ptr/1.cc: Add -std=c++98.
	* testsuite/20_util/auto_ptr/2.cc: Add -std=c++98.
	* testsuite/20_util/auto_ptr/3.cc: Add -std=c++98.
	* testsuite/20_util/auto_ptr/4.cc: Add -std=c++98.
	* testsuite/20_util/auto_ptr/5.cc: Add -std=c++98.
	* testsuite/20_util/auto_ptr/6.cc: Add -std=c++98.
	* testsuite/20_util/auto_ptr/7.cc: Add -std=c++98.
	* testsuite/20_util/auto_ptr/3946.cc: Add -std=c++98.
	* testsuite/20_util/auto_ptr/assign_neg.cc: Add -std=c++98.
	* testsuite/20_util/auto_ptr/requirements/explicit_instantiation/1.cc: Likewise.
	* testsuite/20_util/headers/functional/synopsis.cc: Add -Wno-deprecated.
	* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust expected errors.
	* testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:  Likewise.
	* testsuite/ext/array_allocator/1.cc: Add -Wno-deprecated.
	* testsuite/ext/array_allocator/2.cc: Add -Wno-deprecated.
	* testsuite/ext/array_allocator/26875.cc: Add -Wno-deprecated.
	* testsuite/ext/array_allocator/3.cc: Add -Wno-deprecated.
	* testsuite/ext/array_allocator/check_allocate_max_size.cc: Add -Wno-deprecated.
	* testsuite/ext/array_allocator/check_deallocate_null.cc: Add -Wno-deprecated.
	* testsuite/ext/array_allocator/check_delete.cc: Add -Wno-deprecated.
	* testsuite/ext/array_allocator/check_new.cc: Add -Wno-deprecated.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Prune follow-on error.
	* testsuite/tr1/2_general_utilities/shared_ptr/assign/auto_ptr.cc: Add -std=c++98.
	* testsuite/tr1/2_general_utilities/shared_ptr/assign/auto_ptr_neg.cc: Add -std=c++98.
	* testsuite/tr1/2_general_utilities/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Add -std=c++98.
	* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Add -std=c++98 -fno-show-column.
	* testsuite/tr1/2_general_utilities/shared_ptr/cons/auto_ptr.cc: Add -std=c++98.
	* testsuite/tr1/2_general_utilities/shared_ptr/cons/auto_ptr_neg.cc: Add -std=c++98.
	* testsuite/tr1/6_containers/utility/pair.cc: Add -std=c++98.
	* testsuite/tr1/8_c_compatibility/cmath/pow_cmath.cc: Add -std=c++98.

From-SVN: r222965
2015-05-09 00:50:30 -04:00
Jason Merrill 6cd9cb89eb Makefile.am (AM_CXXFLAGS): Add -std=gnu++98.
* src/c++98/Makefile.am (AM_CXXFLAGS): Add -std=gnu++98.
	* src/c++98/Makefile.in: Regenerate.
	* src/Makefile.am (AM_CXXFLAGS): Add -std=gnu++98.
	* src/Makefile.in: Regenerate.

From-SVN: r222964
2015-05-09 00:50:23 -04:00
Jonathan Wakely f6341d8d09 re PR libstdc++/51617 ([C++0x] async(f) isn't.)
PR libstdc++/51617
	* include/std/future (async): Change default policy to launch::async.

From-SVN: r222793
2015-05-05 02:56:47 +01:00
Jonathan Wakely 563777d7fc any (any::_Storage): Fix alignment of buffer.
* include/experimental/any (any::_Storage): Fix alignment of buffer.
	(any::_Internal): Check alignment of type.
	* testsuite/experimental/any/cons/aligned.cc: New.
	* testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.

From-SVN: r222729
2015-05-02 19:19:39 +01:00
Jonathan Wakely b4f504de77 iterator (ostream_joiner): Simplify by using the injected-class-name and the ostream_type typedef.
* include/experimental/iterator (ostream_joiner): Simplify by using
	the injected-class-name and the ostream_type typedef.

From-SVN: r222728
2015-05-02 19:03:20 +01:00
Jonathan Wakely a623b6f011 iterator: New.
* include/experimental/iterator: New. Define ostream_joiner.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* testsuite/experimental/iterator/make_ostream_joiner.cc: New.
	* testsuite/experimental/iterator/ostream_joiner.cc: New.
	* testsuite/experimental/iterator/requirements.cc: New.
	* doc/xml/manual/status_cxx2017.xml: Update status.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r222727
2015-05-02 18:14:25 +01:00
Jonathan Wakely 6c0b8a537c numeric: New.
* include/experimental/numeric: New. Define gcd and lcm.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* testsuite/experimental/numeric/gcd.cc: New.
	* testsuite/experimental/numeric/lcm.cc: New.
	* doc/xml/manual/status_cxx2017.xml: Update status.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r222724
2015-05-02 16:18:36 +01:00
Edward Smith-Rowland fe4b6acbff Revert addition of feature macros from other headers per latest SD-6.
2015-05-02  Edward Smith-Rowland  <3dw4rd@verizon.net>

        Revert addition of feature macros from other headers per latest SD-6.
        * include/experimental/deque: Remove feature-test macro.
        * include/experimental/forward_list: Ditto.
        * include/experimental/list: Ditto.
        * include/experimental/map: Ditto.
        * include/experimental/set: Ditto.
        * include/experimental/string: Ditto.
        * include/experimental/unordered_map: Ditto.
        * include/experimental/unordered_set: Ditto.

From-SVN: r222722
2015-05-02 12:48:32 +00:00
Jonathan Wakely 9407c6fa53 any (any::_Storage): Make non-copyable.
* include/experimental/any (any::_Storage): Make non-copyable.
	(any::any): Do not copy _Storage object.
	(any::operator=): Implement more efficiently than swapping.
	(any::swap): Use new _Op_xfer operation.
	(any::_Op::_Op_xfer): New enumerator.
	(_Manager_internal::_S_alloc): Remove unused function.
	(_Manager_internal::_S_create, _Manager_external::_S_create): Use out
	parameter instead of returning a _Storage object.
	(_Manager_internal::_S_manage, _Manager_external::_S_manage): Add
	_Op_xfer operation for moving and swapping.
	* testsuite/experimental/any/cons/nontrivial.cc: New.
	* testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.

From-SVN: r222721
2015-05-02 13:38:44 +01:00
Jonathan Wakely 5b244a78dc fs_path.h (filesystem_error::~filesystem_error): Declare.
* include/experimental/fs_path.h (filesystem_error::~filesystem_error):
	Declare.
	* src/filesystem/path.cc (filesystem_error::~filesystem_error):
	Define.

From-SVN: r222720
2015-05-02 12:36:55 +01:00
Jonathan Wakely cb2ef49e83 re PR libstdc++/65978 (missing constexpr on std::forward_as_tuple and std::tie (LWG issues 2275 and 2301))
PR libstdc++/65978
	* include/std/tuple (forward_as_tuple, tie): Add constexpr.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Uncomment
	and fix tests for forward_as_tuple and tie.

From-SVN: r222719
2015-05-02 12:20:03 +01:00
Jonathan Wakely 58f270df25 ops.cc (last_write_time): Set timespec members explicitly instead of with a braced-init-list.
* src/filesystem/ops.cc (last_write_time) [_GLIBCXX_USE_UTIMENSAT]:
	Set timespec members explicitly instead of with a braced-init-list.
	[_GLIBCXX_HAVE_UTIME_H]: Use lambda to handle st_atime being a macro.

From-SVN: r222718
2015-05-02 10:51:49 +01:00
Edward Smith-Rowland 9c0717ed3f deque: Add feature-test macro.
2015-05-02  Edward Smith-Rowland  <3dw4rd@verizon.net>

	* include/experimental/deque: Add feature-test macro.
	* include/experimental/forward_list: Ditto.
	* include/experimental/list: Ditto.
	* include/experimental/map: Ditto.
	* include/experimental/set: Ditto.
	* include/experimental/string: Ditto.
	* include/experimental/unordered_map: Ditto.
	* include/experimental/unordered_set: Ditto.

From-SVN: r222713
2015-05-02 02:01:35 +00:00
Jonathan Wakely b275f0cbe5 * include/experimental/memory: Correct feature-test macro.
From-SVN: r222708
2015-05-01 22:26:24 +01:00
Jonathan Wakely 64b07900f1 memory: Add feature-test macro.
* include/experimental/memory: Add feature-test macro.
	* include/experimental/vector: Likewise.
	* doc/xml/manual/status_cxx2017.xml: Update status.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r222707
2015-05-01 22:01:17 +01:00
Ville Voutilainen 261b7e8af2 Implement observer_ptr.
2015-05-01  Ville Voutilainen  <ville.voutilainen@gmail.com>

	Implement observer_ptr.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/experimental/memory: New.
	* testsuite/experimental/memory/observer_ptr/assignment/assign.cc: New.
	* testsuite/experimental/memory/observer_ptr/cons/cons.cc: New.
	* testsuite/experimental/memory/observer_ptr/hash/hash.cc: New.
	* testsuite/experimental/memory/observer_ptr/make_observer.cc: New.
	* testsuite/experimental/memory/observer_ptr/relops/relops.cc: New.
	* testsuite/experimental/memory/observer_ptr/requirements.cc: New.
	* testsuite/experimental/memory/observer_ptr/swap/swap.cc: New.
	* testsuite/experimental/memory/observer_ptr/typedefs.cc: New.

From-SVN: r222706
2015-05-01 22:01:11 +01:00
Jonathan Wakely 4ad376273d * src/filesystem/path.cc (path::compare): Do not copy strings.
From-SVN: r222704
2015-05-01 21:05:42 +01:00
Jonathan Wakely bf53e6a9dd acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Disable when <dirent.h> is not available.
* acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Disable when <dirent.h>
	is not available.
	(GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for fchmodat.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* configure.ac: Check for utime.h
	* include/experimental/fs_path.h (path::string<>)
	[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove stray typename keyword.
	* src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H] (DIR, opendir,
	closedir, dirent, readdir_r): Replace dummy functions with #error.
	(native_readdir, _Dir::advance): Use readdir when readdir_r is missing.
	* src/filesystem/ops.cc (do_stat, is_set): Make inline.
	(last_write_time) [!_GLIBCXX_USE_UTIMENSAT]: Use utime.
	(permissions) [!_GLIBCXX_USE_FCHMODAT]: Use chmod.
	(space, temp_directory_path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Set
	error_code.

From-SVN: r222703
2015-05-01 20:48:00 +01:00
Jonathan Wakely a00d74c490 fs_path.h (path::_List): Use vector instead of list.
* include/experimental/fs_path.h (path::_List): Use vector instead of
	list.
	* python/libstdcxx/v6/printers.py (StdExpPathPrinter): Adapt.
	* src/filesystem/path.cc: Use std::prev instead of decrementing
	rvalues. Fix whitespace.
	* testsuite/experimental/filesystem/path/decompose/parent_path.cc:
	Do not decrement iterators before begin.

From-SVN: r222702
2015-05-01 20:47:55 +01:00
Jonathan Wakely d6e023f3a0 fs_dir.h: Fix use of non-reserved names.
* include/experimental/fs_dir.h: Fix use of non-reserved names.
	* include/experimental/fs_ops.h: Likewise.
	* include/experimental/fs_path.h: Likewise.
	* testsuite/lib/libstdc++.exp (check_v3_target_filesystem_ts): Use
	C++11 when checking for support.

From-SVN: r222695
2015-05-01 18:55:33 +01:00
Jonathan Wakely e9cd006414 locale_classes.h (locale::facet): Delete copy operations in C++11 mode.
* include/bits/locale_classes.h (locale::facet): Delete copy
	operations in C++11 mode.

From-SVN: r222694
2015-05-01 17:50:31 +01:00
Jonathan Wakely ff0164b48b * include/bits/alloc_traits.h (__alloc_rebind): Change parameter name.
From-SVN: r222686
2015-05-01 16:22:49 +01:00
Jonathan Wakely ce1b114a9c acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Disable for solaris.
* acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Disable for solaris.
	* configure: Regenerate.

From-SVN: r222685
2015-05-01 16:11:05 +01:00
Edward Smith-Rowland ea365e01ef Inline one-line erasure dispatch functions.
2015-05-01  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Inline one-line erasure dispatch functions.
	* include/experimental/forward_list (erase_if(), erase()): Inline.
	* include/experimental/list (erase_if(), erase()): Inline.
	* include/experimental/map (erase_if(*)): Inline.
	* include/experimental/set (erase_if(*)): Inline.
	* include/experimental/string (erase_if(), erase()): Inline.
	* include/experimental/unordered_map (erase_if(*)): Inline.
	* include/experimental/unordered_set (erase_if(*)): Inline.

From-SVN: r222684
2015-05-01 15:00:46 +00:00
Jonathan Wakely 1d15ed75ab intro.xml: Link to new status_cxx2017.xml file.
* doc/xml/manual/intro.xml: Link to new status_cxx2017.xml file.
	* doc/xml/manual/status_cxx2011.xml: Update status tables.
	* doc/xml/manual/status_cxx2014.xml: Likewise.
	* doc/xml/manual/status_cxx2017.xml: New.
	* doc/xml/manual/using.xml: Fix typo.
	* doc/html/*: Regenerate.

From-SVN: r222675
2015-05-01 12:02:24 +01:00
Jonathan Wakely 6fc456c36b memory (pointer_safety, [...]): Define.
* include/std/memory (pointer_safety, declare_reachable,
	undeclare_reachable, declare_no_pointers, undeclare_no_pointers,
	get_pointer_safety): Define.
	* testsuite/20_util/pointer_safety/1.cc: New.

From-SVN: r222674
2015-05-01 12:02:18 +01:00
Jonathan Wakely 0ca7ba9aa6 Implement N4100 File System TS
* acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Define.
	(GLIBCXX_CHECK_FILESYSTEM_DEPS): Define.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Enable filesystem TS and check its dependencies.
	* include/Makefile.am: Add new headers.
	* include/Makefile.in: Regenerate.
	* include/bits/locale_conv.h (__do_str_code_cvt, __str_codecvt_in,
	__str_codecvt_out): Move code conversion logic from wstring_convert
	into new global functions.
	(wstring_convert::to_bytes, wstring_convert::from_bytes): Use new
	functions.
	(wstring_convert::_M_conv): Remove.
	* include/bits/quoted_string.h (_Quoted_string): Split out of iomanip.
	* include/experimental/filesystem: New.
	* include/experimental/fs_dir.h: New.
	* include/experimental/fs_fwd.h: New.
	* include/experimental/fs_ops.h: New.
	* include/experimental/fs_path.h: New.
	* include/std/iomanip (_Quoted_string): Move to bits/quoted_string.h.
	* python/libstdcxx/v6/printers.py (StdExpPathPrinter): Add.
	* src/Makefile.am (SUBDIRS): Add filesystem.
	* src/Makefile.in: Regenerate.
	* src/filesystem/Makefile.am: New.
	* src/filesystem/Makefile.in: New.
	* src/filesystem/dir.cc: New.
	* src/filesystem/ops.cc: New.
	* src/filesystem/path.cc: New.
	* testsuite/experimental/filesystem/operations/absolute.cc: New.
	* testsuite/experimental/filesystem/operations/copy.cc: New.
	* testsuite/experimental/filesystem/operations/current_path.cc: New.
	* testsuite/experimental/filesystem/path/append/path.cc: New.
	* testsuite/experimental/filesystem/path/assign/assign.cc: New.
	* testsuite/experimental/filesystem/path/assign/copy.cc: New.
	* testsuite/experimental/filesystem/path/compare/compare.cc: New.
	* testsuite/experimental/filesystem/path/compare/path.cc: New.
	* testsuite/experimental/filesystem/path/compare/strings.cc: New.
	* testsuite/experimental/filesystem/path/concat/path.cc: New.
	* testsuite/experimental/filesystem/path/concat/strings.cc: New.
	* testsuite/experimental/filesystem/path/construct/copy.cc: New.
	* testsuite/experimental/filesystem/path/construct/default.cc: New.
	* testsuite/experimental/filesystem/path/construct/locale.cc: New.
	* testsuite/experimental/filesystem/path/construct/range.cc: New.
	* testsuite/experimental/filesystem/path/decompose/extension.cc: New.
	* testsuite/experimental/filesystem/path/decompose/filename.cc: New.
	* testsuite/experimental/filesystem/path/decompose/parent_path.cc:
	New.
	* testsuite/experimental/filesystem/path/decompose/relative_path.cc:
	New.
	* testsuite/experimental/filesystem/path/decompose/root_directory.cc:
	New.
	* testsuite/experimental/filesystem/path/decompose/root_name.cc:
	New.
	* testsuite/experimental/filesystem/path/decompose/root_path.cc:
	New.
	* testsuite/experimental/filesystem/path/decompose/stem.cc: New.
	* testsuite/experimental/filesystem/path/generic/generic_string.cc:
	New.
	* testsuite/experimental/filesystem/path/itr/traversal.cc: New.
	* testsuite/experimental/filesystem/path/modifiers/clear.cc: New.
	* testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
	New.
	* testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
	New.
	* testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
	New.
	* testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
	New.
	* testsuite/experimental/filesystem/path/modifiers/swap.cc: New.
	* testsuite/experimental/filesystem/path/nonmember/hash_value.cc: New.
	* testsuite/experimental/filesystem/path/query/empty.cc: New.
	* testsuite/experimental/filesystem/path/query/has_extension.cc: New.
	* testsuite/experimental/filesystem/path/query/has_filename.cc: New.
	* testsuite/experimental/filesystem/path/query/has_parent_path.cc:
	New.
	* testsuite/experimental/filesystem/path/query/has_relative_path.cc:
	New.
	* testsuite/experimental/filesystem/path/query/has_root_directory.cc:
	New.
	* testsuite/experimental/filesystem/path/query/has_root_name.cc:
	New.
	* testsuite/experimental/filesystem/path/query/has_root_path.cc:
	New.
	* testsuite/experimental/filesystem/path/query/has_stem.cc: New.
	* testsuite/experimental/filesystem/path/query/is_relative.cc: New.
	* testsuite/util/testsuite_fs.h: New.

From-SVN: r222654
2015-04-30 20:11:52 +01:00
Edward Smith-Rowland c0b12dad93 Add fundamentals TR container erasure.
2015-04-30  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Add fundamentals TR container erasure.
	* include/Makefile.am: Add new headers.
	* include/Makefile.in: Add new headers.
	* include/experimental/array: New.
	* include/experimental/deque: New.
	* include/experimental/erase_if.tcc: New.
	* include/experimental/forward_list: New.
	* include/experimental/list: New.
	* include/experimental/map: New.
	* include/experimental/set: New.
	* include/experimental/string: New.
	* include/experimental/unordered_map: New.
	* include/experimental/unordered_set: New.
	* include/experimental/vector: New.
	* testsuite/experimental/deque/erasure.cc: New.
	* testsuite/experimental/forward_list/erasure.cc: New.
	* testsuite/experimental/list/erasure.cc: New.
	* testsuite/experimental/map/erasure.cc: New.
	* testsuite/experimental/set/erasure.cc: New.
	* testsuite/experimental/string/erasure.cc: New.
	* testsuite/experimental/unordered_map/erasure.cc: New.
	* testsuite/experimental/unordered_set/erasure.cc: New.
	* testsuite/experimental/vector/erasure.cc: New.

From-SVN: r222630
2015-04-30 14:43:19 +00:00
François Dumont e1c444fef0 2015-04-30 François Dumont <fdumont@gcc.gnu.org>
* include/bits/cpp_type_traits.h
	(__gnu_cxx::__is_normal_iterator): Delete.
	* include/bits/stl_algobase.h (std::__niter_base): Adapt.
	* include/bits/stl_iterator.h (__make_reverse_iterator): New in C++11.
	(std::__niter_base): Overloads for std::reverse_iterator,
	__gnu_cxx::__normal_iterator and std::move_iterator.

From-SVN: r222617
2015-04-30 11:36:52 +00:00
François Dumont 2f132d1d2c hashtable_policy.h (_Prime_rehash_policy::_S_n_primes): Delete.
2015-04-30  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/hashtable_policy.h (_Prime_rehash_policy::_S_n_primes):
	Delete.
	* src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
	Remove usage of latter and compute size of the prime numbers array
	locally.

From-SVN: r222611
2015-04-30 07:13:37 +00:00
Doug Evans 8996b63b09 re PR libstdc++/65839 (xmethods need updating once gdb decides how to fix 18285)
PR libstdc++/65839
	* python/libstdcxx/v6/xmethods.py (get_bool_type): New function.
	Replace all lookups of "bool" with this.
	(get_std_size_type): New function.  Replace all lookups of std::size_t
	with this.
	(*Worker): New method get_result_type.
	(DequeWorkerBase.__init__): New arg val_type.  All callers updated.
	(ListWorkerBase.__init__): New arg val_type.  All callers updated.
	(UniquePtrGetWorker.__init__): New arg elem_type.  All callers updated.
	Delete setting of name, enabled.
	(UniquePtrDerefWorker.__init__): New arg elem_type.  All callers
	updated.  Delete setting of name.
	(UniquePtrMethodsMatcher): Rewrite for consistency with all other
	libstdc++ xmethod matchers.
	* testsuite/libstdc++-xmethods/array.cc: Add whatis tests.
	* testsuite/libstdc++-xmethods/associative-containers.cc: Ditto.
	* testsuite/libstdc++-xmethods/deque.cc: Ditto.
	* testsuite/libstdc++-xmethods/forwardlist.cc: Ditto.
	* testsuite/libstdc++-xmethods/list.cc: Ditto.
	* testsuite/libstdc++-xmethods/unique_ptr.cc: Ditto.
	* testsuite/libstdc++-xmethods/vector.cc: Ditto.

From-SVN: r222599
2015-04-29 22:50:31 +00:00
Doug Evans b693b8792e Use consistent naming for value type attributes.
* python/libstdcxx/v6/xmethods.py (ArrayWorkerBase): Rename _valtype
	to _val_type.
	(ArraySizeWorker, ArrayEmptyWorker): Ditto.
	(ArrayFrontWorker, ArrayBackWorker): Ditto.
	(ArrayAtWorker, ArraySubscriptWorker): Ditto.
	(DequeWorkerBase): Rename elemtype to val_type.
	(ForwardListWorkerBase): Rename _elem_type to _val_type.
	(ForwardListFrontWorker): Ditto.  And rename elem_address to
	val_address.
	(ForwardListMethodsMatcher): Rename elem_type to val_type.
	(VectorWorkerBase): Rename _elemtype to _val_type.

From-SVN: r222596
2015-04-29 21:57:04 +00:00
Jonathan Wakely 952bc7a64c re PR libstdc++/65760 (invalid use of incomplete type with std::is_convertible<C, C>)
PR libstdc++/65760
	* include/std/functional (__check_func_return_type): Use is_same to
	avoid using _is_convertible on incomplete types.
	* testsuite/20_util/function/65760.cc: New.

From-SVN: r222581
2015-04-29 17:07:47 +01:00
Jonathan Wakely f970a17d6f re PR libstdc++/64657 (Support iterators with overloaded operator-comma)
PR libstdc++/64657
	* include/bits/basic_string (basic_string::_S_copy_chars): Cast
	expression to void.
	* include/bits/locale_facets_nonio.tcc (money_get::_M_extract,
	time_get::_M_extract_num, time_get::_M_extract_name,
	time_get::_M_extract_wday_or_month): Likewise.
	* include/bits/stl_algo.h (__includes, __replace_copy_if,
	__is_sorted_until, __is_permutation, transform): Likewise.
	* include/bits/stl_algobase.h (swap_ranges, __copy_move::__copy_m,
	__equal::equal, __lexicographical_compare_impl, equal): Likewise.
	* include/bits/stl_numeric.h (inner_product): Likewise.
	* include/bits/stl_uninitialized.h (__uninitialized_copy_a): Likewise.
	* testsuite/util/testsuite_iterators.h (output_iterator_wrapper,
	input_iterator_wrapper): Declare unusable comma operator.
	* testsuite/21_strings/basic_string/cons/char/64657.cc: New.
	* testsuite/21_strings/basic_string/modifiers/assign/char/64657.cc:
	New.

From-SVN: r222579
2015-04-29 16:22:13 +01:00
Doug Evans 874ef163cf list.cc (_GLIBCXX_USE_CXX11_ABI): Define to zero.
* testsuite/libstdc++-xmethods/list.cc (_GLIBCXX_USE_CXX11_ABI):
	Define to zero.

From-SVN: r222556
2015-04-29 00:17:09 +00:00
Jonathan Wakely 2e7e2075d1 stl_algo.h (random_shuffle): Only define for hosted implementations.
* include/bits/stl_algo.h (random_shuffle): Only define for hosted
	implementations.

From-SVN: r222542
2015-04-28 20:42:56 +01:00
Jonathan Wakely 0088583b25 Makefile.am (SUBDIRS): Move python to hosted_source.
* Makefile.am (SUBDIRS): Move python to hosted_source.
	* Makefile.in: Regenerate.
	* acinclude.m4 (glibcxx_SUBDIRS): Reorder.
	* configure: Regenerate.

From-SVN: r222541
2015-04-28 20:42:51 +01:00
Marc Glisse fa9ac91269 re PR libstdc++/65883 (numeric_limits<unsigned __int128>::max() returns incorrect value)
2015-04-28  Marc Glisse  <marc.glisse@inria.fr>

	PR libstdc++/65883
	* include/std/limits (numeric_limits): Add missing unsigned.

From-SVN: r222540
2015-04-28 19:35:49 +00:00
Stephan Bergmann 77e9546989 vector (_Safe_vector::operator=): Add missing returns.
2015-04-28  Stephan Bergmann  <sbergman@redhat.com>

	* include/debug/vector (_Safe_vector::operator=): Add missing returns.

From-SVN: r222532
2015-04-28 16:05:27 +01:00
Jonathan Wakely 73d81d3a6b re PR libstdc++/60333 (type_traits make_signed, make_unsigned missing support for long long enumerations)
PR libstdc++/60333
	* include/std/type_traits (__make_unsigned_selector<_Tp, false, true>):
	Handle enumeration types larger than sizeof(long).
	(__make_signed_selector<_Tp, false, true>): Find unsigned type then
	make it signed.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs-3.cc: New.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
	dg-error.
	* testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: New.

From-SVN: r222526
2015-04-28 14:21:54 +01:00
Jonathan Wakely 956d18149e re PR libstdc++/61645 (forward_list::splice_after shall not throw exceptions)
PR libstdc++/61645
	* include/bits/forward_list.h (forward_list::splice_after): Add
	noexcept.
	* include/bits/forward_list.tcc (forward_list::splice_after):
	Likewise.

From-SVN: r222525
2015-04-28 14:05:33 +01:00
Jonathan Wakely d747ee05e3 re PR libstdc++/65631 (seed_seq should not be copyable)
PR libstdc++/65631
	* include/bits/random.h (seed_seq) Define copy constructor and copy
	assignment as deleted.
	* testsuite/26_numerics/random/seed_seq/cons/65631.cc: New.

From-SVN: r222524
2015-04-28 13:35:30 +01:00
Jonathan Wakely 196e0493cb exception (uncaught_exceptions): Add comment.
* libsupc++/exception (uncaught_exceptions): Add comment. Reorder #if.
	* testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
	Use -std=gnu++1z. Check feature-test macro.

From-SVN: r222523
2015-04-28 13:07:40 +01:00
Jonathan Wakely bd1eb5e092 type_traits (void_t): Add.
* include/std/type_traits (void_t): Add.
	* testsuite/20_util/void_t/1.cc: New.

From-SVN: r222522
2015-04-28 13:07:34 +01:00
Tim Shen e4846be7dd regex.tcc: Handle regex_constants::__polynomial.
* include/bits/regex.tcc: Handle regex_constants::__polynomial.
	* include/bits/regex_automaton.tcc: Throw exception when parsing
	back-reference with flag __polynomial.
	* include/bits/regex_constants.h: Add extension flag
	syntax_option_type __polynomial.
	* bits/regex_executor.tcc: Still let BFS process ECMAScript.
	Alternative operation will be fixed in the coming refactoring.
	* testsuite/28_regex/algorithms/regex_search/61424.cc: Turn
	loose match_search_debug to use DFS only.

From-SVN: r222500
2015-04-28 04:16:48 +00:00
Sandra Loosemore 1a9f259288 re PR libstdc++/65909 (check_v3_target_namedlocale blows up on targets that don't support command-line arguments)
2015-04-27  Sandra Loosemore  <sandra@codesourcery.com>

	PR libstdc++/65909

	libstdc++-v3/
	* testsuite/lib/libstdc++.exp (check_v3_target_namedlocale):
	Make the generated test program fail gracefully if the target
	doesn't	support passing command-line arguments.

From-SVN: r222497
2015-04-27 22:40:56 -04:00
Federico Lenarduzzi 03e73da676 eh_catch.cc (uncaught_exception, [...]): Return false or zero if the library is built without exceptions.
2015-04-27  Federico Lenarduzzi  <federico.lenarduzzi@tallertechnologies.com>
	    Jonathan Wakely  <jwakely@redhat.com>

	* libsupc++/eh_catch.cc (uncaught_exception, uncaught_exceptions):
	Return false or zero if the library is built without exceptions.
	* libsupc++/eh_term_handler.cc: Disable verbose terminate handler if
	the library is built without exceptions.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>

From-SVN: r222484
2015-04-27 22:06:17 +01:00
Ville Voutilainen 913ae610c2 gnu.ver: Fix comment.
2015-04-27  Ville Voutilainen  <ville.voutilainen@gmail.com>

	* config/abi/pre/gnu.ver: Fix comment.

From-SVN: r222483
2015-04-27 21:52:14 +01:00
Ville Voutilainen 03a16cc404 Add support for std::uncaught_exceptions.
2015-04-27  Ville Voutilainen  <ville.voutilainen@gmail.com>

	Add support for std::uncaught_exceptions.
	* acinclude.m4: Bump libtool_VERSION.
	* config/abi/pre/gnu.ver: Export the new symbol.
	* configure: Regenerate.
	* libsupc++/eh_catch.cc (uncaught_exceptions): New.
	* libsupc++/exception (uncaught_exceptions): New.
	* testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc: New.
	* testsuite/util/testsuite_abi.cc: Add 3.4.22 as the latest version.

From-SVN: r222482
2015-04-27 21:40:29 +01:00
Dmitry Prokoptsev f5eedc3915 re PR libstdc++/62258 (uncaught_exception() equals to `true' after rethrow_exception())
2015-04-27  Dmitry Prokoptsev  <dprokoptsev@gmail.com>
	    Michael Hanselmann  <public@hansmi.ch>

	PR libstdc++/62258
	* libsupc++/eh_ptr.cc (rethrow_exception): Increment count of
	uncaught exceptions.
	* testsuite/18_support/exception_ptr/62258.cc: New.

Co-Authored-By: Michael Hanselmann <public@hansmi.ch>

From-SVN: r222480
2015-04-27 20:44:30 +01:00
Jonathan Wakely 991607ab25 extensions.xml: Add cross-reference.
* doc/xml/manual/extensions.xml: Add cross-reference.
	* doc/html/manual/ext_compile_checks.html: Regenerate.

From-SVN: r222462
2015-04-27 13:30:26 +01:00
Szabolcs Nagy 85da5c3024 libstdc++, libgfortran gthr workaround for musl
On behalf of szabolcs.nagy@arm.com

[libstdc++-v3/]
2015-04-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define.
	* configure.host (os_include_dir): Set to "os/generic" for linux-musl*.

[libgfortran/]
2015-04-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*.
	* configure: Regenerate.

From-SVN: r222329
2015-04-22 14:24:11 +00:00
Renlin Li 04934297b8 [PATCH][libstc++v3]Add new dg-require-thread-fence directive.
libstdc++-v3/

2015-04-22  Renlin Li  <renlin.li@arm.com>

	* testsuite/lib/dg-options.exp (dg-require-thread-fence): New.
	* testsuite/lib/libstdc++.exp (check_v3_target_thread_fence): New.
	* testsuite/29_atomics/atomic_flag/clear/1.cc: Use it.
	* testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc: Likewise.
	* testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc: Likewise.

From-SVN: r222324
2015-04-22 14:01:02 +00:00
Jonathan Wakely 8a29fdfd23 configure.xml: Update descriptions of options affecting dual ABI and add cross-references.
* doc/xml/manual/configure.xml: Update descriptions of options
	affecting dual ABI and add cross-references.
	* doc/xml/manual/strings.xml: Clarify that string isn't COW now.
	* doc/xml/manual/using.xml: Document ABI transition.
	* doc/html/*: Regenerate.

From-SVN: r222262
2015-04-21 11:38:43 +01:00
Jonathan Wakely 0ee59f1f05 abi.xml: Use uppercase for C++ Standard Library.
* doc/xml/manual/abi.xml: Use uppercase for C++ Standard Library.
	* doc/xml/manual/using.xml: Document newer -std options. Use better
	examples of nested namespaces.

From-SVN: r222261
2015-04-21 11:27:18 +01:00
Jonathan Wakely 9adc2d48ac concurrency_extensions.xml: Update documentation on atomics.
* doc/xml/manual/concurrency_extensions.xml: Update documentation
	on atomics.
	* doc/xml/manual/using.xml: Likewise. Improve markup.
	* doc/html/*: Regenerate.

From-SVN: r222230
2015-04-20 12:07:50 +01:00
Rainer Orth eea6e98958 Ignore elfdump warnings in scripts/extract_symvers.pl
* scripts/extract_symvers.pl: Ignore elfdump error output.

From-SVN: r222117
2015-04-15 07:48:59 +00:00
Marc Glisse 194571f10e re PR libstdc++/61347 (std::distance(list.first(),list.end()) in O(1))
2015-04-14  Marc Glisse  <marc.glisse@inria.fr>

	PR libstdc++/61347
	* include/bits/stl_iterator_base_funcs.h (_List_iterator,
	_List_const_iterator): Declare.
	(__distance): Declare new overloads for _List_iterator and
	_List_const_iterator.
	* include/bits/stl_list.h (__distance): New overloads for
	_List_iterator and _List_const_iterator.
	* testsuite/23_containers/list/61347.cc: New testcase.

From-SVN: r222082
2015-04-14 11:02:48 +00:00
Jonathan Wakely 453e2916ce evolution.xml: Fix typos.
* doc/xml/manual/evolution.xml: Fix typos.
	* doc/html/manual/api.html: Regenerate.

From-SVN: r222081
2015-04-14 11:08:58 +01:00
Hans-Peter Nilsson 0357625940 Fix regression for libstdc++-v3/testsuite/29_atomics/atomic/62259.cc as...
Fix regression for libstdc++-v3/testsuite/29_atomics/atomic/62259.cc
as reported at <http://gcc.gnu.org/ml/gcc-patches/2015-04/msg00543.html>.

	* testsuite/29_atomics/atomic/62259.cc: Assert atomic
	alignment is larger-equal, not equal, to default alignment.

From-SVN: r222072
2015-04-14 00:37:57 +00:00
Jonathan Wakely 1fcbcb6b26 re PR libstdc++/65754 (missing exports for fstream constructors)
PR libstdc++/65754
	* config/abi/pre/gnu.ver: Export base object constructors for
	fstreams.
	* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update
	* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
	* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/solaris2.10/baseline_symbols.txt: Regenerate.
	* config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Likewise.
	* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
	* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Update.
	* testsuite/27_io/basic_fstream/cons/base.cc: New.

From-SVN: r222059
2015-04-13 19:41:42 +01:00
Jonathan Wakely 040175d59c evolution.xml: Document changes since 4.5 release.
* doc/xml/manual/evolution.xml: Document changes since 4.5 release.
	* doc/html/*: Regenerate.

From-SVN: r222055
2015-04-13 17:21:33 +01:00
Uros Bizjak a57013168d baseline_symbols.txt: Update.
* config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r222018
2015-04-12 08:40:39 +02:00
Andreas Schwab cb86fa2234 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
From-SVN: r221987
2015-04-10 20:07:09 +00:00
Andreas Schwab 2fb17d35e4 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
From-SVN: r221986
2015-04-10 20:05:48 +00:00
Jonathan Wakely cd80c79ce7 test.xml: Improve documentation on running a subset of tests.
* doc/xml/manual/test.xml: Improve documentation on running a subset
	of tests.
	* doc/html/manual/test.html: Regenerate.

From-SVN: r221985
2015-04-10 20:59:32 +01:00
Bill Schmidt 00778bed5f baseline_symbols.txt: Update for GCC 5.1 release.
2015-04-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update
	for GCC 5.1 release.
	* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt:
	Likewise.

From-SVN: r221974
2015-04-10 13:43:09 +00:00
Jonathan Wakely c3d71b62c6 shared_mutex (shared_timed_mutex): Only use pthread_rwlock_t when the POSIX Timeouts option is supported.
* include/std/shared_mutex (shared_timed_mutex): Only use
	pthread_rwlock_t when the POSIX Timeouts option is supported.
	* testsuite/30_threads/shared_lock/cons/5.cc: Remove
	dg-require-gthreads-timed.
	* testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
	* testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
	* testsuite/30_threads/shared_lock/locking/4.cc: Likewise.

From-SVN: r221971
2015-04-10 10:00:00 +01:00
Jonathan Wakely 43b0e124e4 shared_mutex (shared_timed_mutex): Add comments to explain the logic in the non-pthread_rwlock_t version.
* include/std/shared_mutex (shared_timed_mutex): Add comments to
	explain the logic in the non-pthread_rwlock_t version.
	(_Mutex): Remove redundant type.
	(_M_n_readers): Rename to _S_max_readers.
	(_M_write_entered, _M_readers): New convenience functions.
	(lock, lock_shared, try_lock_shared, unlock_shared): Use convenience
	functions. Use predicates with condition variables. Simplify bitwise
	operations.
	(try_lock_for, try_shared_lock_for): Convert duration to time_point
	and call try_lock_until or try_shared_lock_until respectively.
	(try_lock_until, try_shared_lock_until): Wait on the condition
	variables until the specified time passes.
	(unlock): Add Debug Mode assertion.
	(unlock_shared): Add Debug Mode assertion.
	* testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: New.

From-SVN: r221970
2015-04-10 09:59:54 +01:00
H.J. Lu 1bf137444b Update x32 baseline_symbols.txt
* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Update.

From-SVN: r221953
2015-04-09 08:41:38 -07:00
Jonathan Wakely 4cbaaa459e re PR libstdc++/65147 (alignment of std::atomic object is not correct)
2015-04-09  Jonathan Wakely  <jwakely@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	PR libstdc++/65147
	* include/bits/atomic_base.h (__atomic_base<_ITp>): Increase
	alignment.
	* include/std/atomic (atomic): For types with a power of two size set
	alignment to at least the size.
	* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.
	* testsuite/29_atomics/atomic/65147.cc: New.
	* testsuite/29_atomics/atomic_integral/65147.cc: New.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r221945
2015-04-09 12:15:44 +01:00
Rainer Orth 9a165842d1 Update Solaris baselines
* config/abi/post/solaris2.10/baseline_symbols.txt: Regenerate.
	* config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Likewise.

From-SVN: r221941
2015-04-09 07:05:41 +00:00
Jakub Jelinek 466df27b94 baseline_symbols.txt: Update.
* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
	* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r221933
2015-04-08 22:46:30 +02:00
Jonathan Wakely 744e26e71e re PR libstdc++/65630 (operator+ for new std::string not exported)
PR libstdc++/65630
	* config/abi/pre/gnu.ver: Export operator+ for new strings.
	* testsuite/21_strings/basic_string/operators/char/65630.cc: New.
	* testsuite/21_strings/basic_string/operators/wchar_t/65630.cc: New.

From-SVN: r221775
2015-03-30 18:52:37 +01:00
Tim Shen 2894311302 re PR libstdc++/65420 (Enumerators in std::regex_constants should be constexpr variables instead)
PR libstdc++/65420
	* include/bits/regex_constants.h: Use constexpr variables for flags.
	* testsuite/28_regex/constants/constexpr.cc: New testcase.

From-SVN: r221750
2015-03-28 04:17:12 +00:00
Jonathan Wakely 04f69fda7a re PR libstdc++/65499 (Missing "using namespace literals::chrono_literals" in std::chrono)
PR libstdc++/65499
	* include/std/chrono: Add using-directive for literals to std::chrono.
	* testsuite/20_util/duration/literals/65499.cc: New.

From-SVN: r221730
2015-03-27 12:45:10 +00:00
Jonathan Wakely d1a74a287e re PR libstdc++/58038 (std::this_thread::sleep_until can cause inifinite sleep)
PR libstdc++/58038
	PR libstdc++/60421
	* include/std/thread (this_thread::sleep_for): Check for negative
	durations.
	(this_thread::sleep_until): Check for times in the past.
	* testsuite/30_threads/this_thread/58038.cc: New.
	* testsuite/30_threads/this_thread/60421.cc: New.

From-SVN: r221708
2015-03-26 19:59:08 +00:00
Jonathan Wakely 4280698d09 re PR libstdc++/62259 (atomic class doesn't enforce required alignment on powerpc64)
PR libstdc++/62259
	PR libstdc++/65147
	* include/std/atomic (atomic<T>): Increase alignment for types with
	the same size as one of the integral types.
	* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.
	* testsuite/29_atomics/atomic/62259.cc: New.

From-SVN: r221703
2015-03-26 19:27:02 +00:00
Richard Henderson 8be568519b re PR libstdc++/65033 (C++11 atomics: is_lock_free result does not always match the real lock-free property)
PR libstdc++/65033

 * include/bits/atomic_base.h (__atomic_base<T>::is_lock_free): Build
 a fake pointer indicating type alignment.
 (__atomic_base<T *>::is_lock_free): Likewise.
 * include/std/atomic (atomic<T>::is_lock_free): Likewise.

From-SVN: r221701
2015-03-26 11:31:11 -07:00
Alan Lawrence 28fda0c459 re PR libstdc++/33394 (Add test case for Thread race segfault in std::string::append with -O and -s)
PR libstdc++/33394
	* testsuite/21_strings/basic_string/pthread33394.cc: Use
	dg-additional-options.

From-SVN: r221666
2015-03-25 15:46:58 +00:00
Paolo Carlini ea348bbe59 re PR libstdc++/65543 (rvalue stream insertion and extraction operators incorrectly implemented)
2015-03-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/65543
	* include/std/istream (operator>>(basic_istream<>&&, _Tp&): Revert
	thinko in r150387.
	* include/std/ostream (operator<<(basic_ostream<>&&, const _Tp&):
	Likewise.
	* testsuite/27_io/rvalue_streams-2.cc: New.

From-SVN: r221655
2015-03-25 09:57:06 +00:00
Jonathan Wakely 9ccd0dba21 re PR libstdc++/33394 (Add test case for Thread race segfault in std::string::append with -O and -s)
PR libstdc++/33394
	* testsuite/21_strings/basic_string/pthread33394.cc: Add test.

# Auto-generated commit message above this line, original below.
	PR libstdc++/33394
	* testsuite/21_strings/basic_string/pthread33394.cc: Add test.

From-SVN: r221635
2015-03-24 14:47:32 +00:00
Jonathan Wakely 8dcf3d3c5d re PR libstdc++/64967 (Bootstrap fails due to errors in libstdc++ sources with `--enable-symvers=gnu-versioned-namespace')
PR libstdc++/64967
	* acinclude.m4: Disable dual ABI when gnu-versioned-namespace in use.
	* configure: Regenerate.
	* src/c++11/compatibility-c++0x.cc (error_category), generic_category,
	system_category): Use macros for versioned namespace.
	* src/c++11/futex.cc: Add missing end macro for versioned namespace.

From-SVN: r221600
2015-03-23 16:47:18 +00:00
James Greenhalgh c00acee464 [Patch Testsuite] Make all_attributes.cc in to (almost_)all_attributes.cc for ARM.
* testsuite/17_intro/headers/c++1998/all_attributes.cc: Disable
	test for unused for ARM.
	* testsuite/17_intro/headers/c++200x/all_attributes.cc: Likewise.
	* testsuite/17_intro/headers/c++2014/all_attributes.cc: Likewise.

From-SVN: r221538
2015-03-20 17:20:12 +00:00
Jonathan Wakely df6d9c7f6a c++config (__gnu_cxx::__cxx11): Define new namespace.
* include/bits/c++config (__gnu_cxx::__cxx11): Define new namespace.
	* include/ext/codecvt_specializations.h (encoding_state,
	encoding_char_traits): Remove abi-tag and use inline namespace.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error line.

From-SVN: r221533
2015-03-20 13:26:55 +00:00
Jason Merrill 7cb7357360 re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types)
PR c++/65046
	Automatically propagate ABI tags to variables and functions
	from their (return) type.
	* class.c (check_tag): Handle variables and functions.
	(mark_or_check_attr_tags): Split out from find_abi_tags_r.
	(mark_or_check_tags): Likewise.
	(mark_abi_tags): Use it.  Rename from mark_type_abi_tags.
	(check_abi_tags): Add single argument overload for decls.
	Handle inheriting tags for decls.
	* mangle.c (write_mangled_name): Call it.
	(mangle_return_type_p): Split out from write_encoding.
	(unmangled_name_p): Split out from write_mangled_name.
	(write_mangled_name): Ignore abi_tag on namespace.
	* cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
	* parser.c (cp_parser_namespace_definition): Set it.
	* name-lookup.c (handle_namespace_attrs): Use arguments. Warn
	about abi_tag attribute on non-inline namespace.
	* tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
	(handle_abi_tag_attribute): Allow tags on variables.

From-SVN: r221521
2015-03-19 15:31:48 -04:00
Jonathan Wakely 168ad5f5e3 re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types)
PR c++/65046
	* config/locale/gnu/messages_members.cc (Catalog_info, Catalogs,
	get_catalogs): Add abi-tag.
	* include/ext/codecvt_specializations.h (encoding_state,
	encoding_char_traits): Likewise.
	* src/c++11/cxx11-ios_failure.cc (io_error_category): Likewise.
	* src/c++11/cxx11-shim_facets.cc (__any_string::operator basic_string,
	numpunct_shim, collate_shim, time_get_shim, moneypunct_shim,
	money_get_shim, money_put_shim, messages_shim): Likewise.
	* src/c++11/future.cc (future_error_category::message): Likewise.
	* src/c++11/system_error.cc (generic_error_category::message,
	system_error_category::message): Likewise.
	(__sso_string): Disable -Wabi-tag warnings.

From-SVN: r221497
2015-03-18 18:08:29 +00:00
Jonathan Wakely 2a9611d03b re PR libstdc++/13631 (Problems in messages)
PR libstdc++/13631
	* config/locale/gnu/messages_members.cc (get_glibc_msg): Fix fallback
	implementation for old glibc. Fix whitespace.

From-SVN: r221494
2015-03-18 16:17:47 +00:00
Jonathan Wakely 5e0216f173 acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Check for pthread_rwlock_t.
2015-03-18  Jonathan Wakely  <jwakely@redhat.com>
	    Torvald Riegel  <triegel@redhat.com>

	* acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Check for pthread_rwlock_t.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* include/std/shared_mutex: Check _GLIBCXX_USE_PTHREAD_RWLOCK_T.
	(shared_timed_mutex::_M_rwlock): Use PTHREAD_RWLOCK_INITIALIZER.
	(shared_timed_mutex::lock_shared()): Retry on EAGAIN.
	(shared_timed_mutex::try_lock_shared_until()): Retry on EAGAIN and
	EDEADLK.

Co-Authored-By: Torvald Riegel <triegel@redhat.com>

From-SVN: r221484
2015-03-18 10:53:38 +00:00
Jonathan Wakely 1c6f4a147d 1.cc: Remove name of unused exception variable.
* testsuite/30_threads/shared_lock/modifiers/1.cc: Remove name of
	unused exception variable.
	* testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
	* testsuite/30_threads/shared_lock/modifiers/2.cc: Remove duplicate
	test.
	* testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise.

From-SVN: r221477
2015-03-17 16:36:32 +00:00
Jonathan Wakely 95f2fd9c5d nested_exception.h: Do not try to derive from final classes.
* libsupc++/nested_exception.h: Do not try to derive from final
	classes.
	* testsuite/18_support/nested_exception/throw_with_nested.cc: Test
	final class.

From-SVN: r221476
2015-03-17 14:24:55 +00:00
Jonathan Wakely e83a01c383 * include/experimental/system_error: Fix include guard.
From-SVN: r221417
2015-03-13 12:47:21 +00:00
Jonathan Wakely 9b78b1e730 acinclude.m4: Make --enable-libstdcxx-time=auto work for dragonfly.
* acinclude.m4: Make --enable-libstdcxx-time=auto work for dragonfly.
	* configure: Regenerate.

From-SVN: r221414
2015-03-13 10:49:08 +00:00
Renlin Li 04a1709359 [PATCH]Remove xfail for wrapped target
libstdc++-v3/

2015-03-12  Renlin Li  <renlin.li@arm.com>

	* testsuite/27_io/ios_base/sync_with_stdio/1.cc: Remove xfail for
	wrapped target.

From-SVN: r221393
2015-03-12 15:00:28 +00:00
Tim Shen 84839a5140 re PR libstdc++/64441 (A match_results returns an incorrect sub_match if the sub_match::matched is false)
PR libstdc++/64441
	* include/bits/regex.h (match_results<>::size,
	match_results<>::position, match_results<>::str,
	match_results<>::operator[], match_results<>::prefix,
	match_results<>::suffix, match_results<>::end,
	match_results<>::_M_resize, match_results<>::_M_unmatched_sub,
	match_results<>::_M_prefix, match_results<>::_M_suffix): Remove
	global __unmatched_sub. Add unmatched submatch as part of
	match_results.
	* include/bits/regex.tcc (__regex_algo_impl<>, regex_replace<>,
	regex_iterator<>::operator++): Adjust to use match_results::_M_prefix.
	* testsuite/28_regex/match_results/out_of_range_submatches.cc:
	New testcases.

From-SVN: r221330
2015-03-10 18:41:46 +00:00