Commit Graph

9751 Commits

Author SHA1 Message Date
Jonathan Wakely d34d36ef0d PR libstdc++/79789 fix non-reserved names in headers
PR libstdc++/79789
	* include/bits/hashtable_policy.h (__clp2): Use reserved names for
	parameters and local variables.
	* include/bits/ios_base.h (make_error_code, make_error_condition):
	Likewise.
	* include/bits/list.tcc (list::sort): Likewise.
	* include/bits/mask_array.h (mask_array): Likewise.
	* include/bits/regex.h (regex_token_iterator): Likewise.
	* include/bits/slice_array.h (slice_array): Likewise.
	* include/bits/stl_algo.h (__sample): Likewise.
	* include/std/memory (undeclare_no_pointers): Likewise.
	* include/std/type_traits (is_callable_v, is_nothrow_callable_v):
	Likewise.
	* libsupc++/exception_ptr.h (__dest_thunk): Likewise.
	* testsuite/17_intro/headers/names.cc: New test.

From-SVN: r245828
2017-03-02 03:43:49 +00:00
Jonathan Wakely 5782e30941 PR 79798 Fix incorrect use of std::result_of in std::bind
PR libstdc++/79798
	* include/std/functional (bind::_Res_type_impl): Fix incorrect use of
	result_of that loses top-level cv-qualifiers.
	* testsuite/20_util/bind/79798.cc: New test.

From-SVN: r245827
2017-03-02 03:43:36 +00:00
Gerald Pfeifer 00133e166c documentation_hacking.xml: Tweak link to doxygen.org.
* doc/xml/manual/documentation_hacking.xml: Tweak link to
	doxygen.org.

From-SVN: r245808
2017-03-01 12:53:28 +00:00
Jonathan Wakely cb701078b1 Ensure <experimental/iterator> includes <iterator>
* include/experimental/iterator: Include <iterator>.
	* testsuite/experimental/iterator/requirements.cc: Check for contents
	of <iterator>.

From-SVN: r245686
2017-02-23 18:25:22 +00:00
Dinka Ranns 1dee318ad8 C++17 GB50 resolution (P0505R0)
2017-02-19  Dinka Ranns  <dinka.ranns@googlemail.com>

	C++17 GB50 resolution
	* include/std/chrono (duration::operator++()): Add
	_GLIBCXX17_CONSTEXPR.
	(duration::operator++(int)): Likewise.
	(duration::operator--()): Likewise.
	(duration::operator--(int)): Likewise.
	(duration::operator+=(const duration&)): Likewise.
	(duration::operator-=(const duration&)): Likewise.
	(duration::operator*=(const rep&)): Likewise.
	(duration::operator/=(const rep&)): Likewise.
	(duration::operator%=(const rep&)): Likewise.
	(duration::operator%=(const duration&)): Likewise.
	(time_point::operator+=(const duration&)): Likewise.
	(time_point::operator-=(const duration&)): Likewise.
	* testsuite/20_util/duration/arithmetic/constexpr_c++17.cc: New test.
	* testsuite/20_util/duration/literals/range.cc: Adjust dg-error.
	* testsuite/20_util/time_point/arithmetic/constexpr.cc: New test.

From-SVN: r245575
2017-02-19 16:04:35 +00:00
Gerald Pfeifer ff7da2b6cf * doc/xml/manual/debug.xml: Adjust link to ThreadSanitizer.
From-SVN: r245572
2017-02-19 10:54:35 +00:00
Gerald Pfeifer 3fad5342e2 io.xml: Update link to groups.google.com.
* doc/xml/manual/io.xml: Update link to groups.google.com.
	Tweak link description.

From-SVN: r245565
2017-02-18 21:15:51 +00:00
Gerald Pfeifer dc15bc7ad6 * doc/xml/manual/profile_mode.xml: Fix link.
From-SVN: r245559
2017-02-18 08:37:19 +00:00
Gerald Pfeifer 60e5333170 policy_data_structures.xml: Simplify and standardize references to boost.org.
* doc/xml/manual/policy_data_structures.xml: Simplify and
	standardize references to boost.org.
	* doc/xml/manual/policy_data_structures_biblio.xml: Ditto.
	* doc/xml/manual/shared_ptr.xml: Ditto.

From-SVN: r245507
2017-02-16 15:25:18 +00:00
Jonathan Wakely 728e81e3bc PR libstdc++/60936 fix length calculation
PR libstdc++/60936
	* src/c++11/snprintf_lite.cc (__concat_size_t): Calculate length
	written to buffer, not length remaining in buffer.

From-SVN: r245505
2017-02-16 12:06:28 +00:00
Tim Shen d255829bbc re PR libstdc++/78723 ([variant] P0393r3: "Making variant greater equal again" is unimplemented)
PR libstdc++/78723
	* include/std/variant (operator<(), operator>(), operator<=(),
	operator>=(), operator==(), operator!=()): Implement P0393R3.
	* testsuite/20_util/variant/compile.cc: Adjust tests.
	* testsuite/20_util/variant/run.cc: Adjust tests.

From-SVN: r245475
2017-02-15 09:01:06 +00:00
Tim Shen 7d5abe42c2 re PR libstdc++/79513 (std::visit doesn't handle references)
PR libstdc++/79513
	* include/std/variant (visit()): Forward variant types to the return
	type detection code.
	* testsuite/20_util/variant/compile.cc: Add test cases.

From-SVN: r245474
2017-02-15 07:38:20 +00:00
H.J. Lu 30956ccc55 x32: Update baseline_symbols.txt
PR libstdc++/79348
	* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.

From-SVN: r245394
2017-02-13 08:47:35 -08:00
Jakub Jelinek 2d3bc14c2e re PR libstdc++/79348 (abi_check fails on s390x (2 undesignated symbols))
PR libstdc++/79348
	* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Likewise.
	* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Likewise.
	* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Likewise.
	* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Likewise.
	* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Likewise.
	* config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Likewise.
	* config/abi/post/s390-linux-gnu/baseline_symbols.txt: Likewise.
	* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Likewise.

From-SVN: r245389
2017-02-13 16:38:33 +01:00
Jonathan Wakely def227f1ad PR libstdc++/79486 use lvalues in result_of expressions
PR libstdc++/79486
	* include/std/future (__future_base::_Task_state::_M_run)
	(__future_base::_Task_state::_M_run_delayed): Use lvalue types in
	result_of expressions.
	* testsuite/30_threads/packaged_task/79486.cc: New.

From-SVN: r245386
2017-02-13 13:13:29 +00:00
Jonathan Wakely 99ebfe9075 PR libstdc++/79467 use lvalues in is_callable check
PR libstdc++/79467
	* include/bits/shared_ptr_base.h (__shared_ptr(_Yp*, _Deleter))
	(__shared_ptr(_Yp*, _Deleter, _Alloc)): Use lvalue types in
	__is_callable check.
	* testsuite/20_util/shared_ptr/cons/79467.cc: New.

From-SVN: r245363
2017-02-11 21:08:11 +00:00
Jonathan Wakely fe701c775e Adjust whitespace in <bits/atomic_base.h>
* include/bits/atomic_base.h: Re-indent.

From-SVN: r245362
2017-02-11 21:08:06 +00:00
Gerald Pfeifer 42f8e766cc * doc/xml/manual/profile_mode.xml: Update a paper reference.
From-SVN: r245349
2017-02-10 22:20:16 +00:00
Gerald Pfeifer a8fc7e0765 * src/c++11/snprintf_lite.cc (__err): Use https for bug reporting.
From-SVN: r245288
2017-02-08 21:50:59 +00:00
Jonathan Wakely 96189df366 Update links and references in libstdc++ manual
* doc/xml/manual/policy_data_structures.xml: Fix spelling of author's
	name.
	* doc/xml/manual/policy_data_structures_biblio.xml: Likewise. Remove
	broken links to texts that are no longer online.
	* doc/xml/manual/profile_mode.xml: Update links to CGO 2009 paper and
	LCPC 2006 paper.
	* doc/xml/manual/using.xml: Update links to memory model information.
	* doc/xml/manual/using_exceptions.xml: Update link to "Appendix E:
	Standard-Library Exception Safety".
	* doc/html/*: Regenerate.

From-SVN: r245277
2017-02-08 12:02:36 +00:00
Gerald Pfeifer 41cf3f3eb9 profile_mode.xml: Unbreak link to "Optimizing Sorting with Machine Learning Algorithms".
* doc/xml/manual/profile_mode.xml: Unbreak link to
        "Optimizing Sorting with Machine Learning Algorithms".

From-SVN: r245269
2017-02-08 07:22:01 +00:00
Gerald Pfeifer 97355ece9c * src/c++11/snprintf_lite.cc (__err): Update bug reporting URL.
From-SVN: r245268
2017-02-08 07:17:19 +00:00
Gerald Pfeifer a68354c883 abi.xml: Update link to "Sun Studio 11: C++ Migration Guide".
* doc/xml/manual/abi.xml: Update link to "Sun Studio 11: C++
	Migration Guide".

From-SVN: r245261
2017-02-07 23:38:12 +00:00
Gerald Pfeifer ca314fbd25 lwg-active.html: Remove.
* doc/html/ext/lwg-active.html: Remove.
	* doc/html/ext/lwg-closed.html: Ditto.
	* doc/html/ext/lwg-defects.html: Ditto.

	* doc/Makefile.am (xml_extradir): Remove.
	(xml_extra): Ditto.
	(stamp-html-docbook-lwg): Remove recipe...
	(stamp-html-docbook-data): ...and its use here.
	* doc/Makefile.in: Regenerate.

	* doc/xml/manual/intro.xml: Shorten two paragraphs explaining
	the relationship to the upstream working group.
	Replace a local link to ../ext/lwg-active.html by the upstream one.
	Replace all reference to ../ext/lwg-defects.html by a new entity
	&DR; which refers to the upstream address.

From-SVN: r245258
2017-02-07 22:44:13 +00:00
Gerald Pfeifer 7c18cb707b * doc/xml/manual/status_cxx2017.xml: Fix link to N4284.
From-SVN: r245257
2017-02-07 22:10:06 +00:00
Jonathan Wakely 3e4fd831e9 Fix test failure at -O0 by pruning output
PR libstdc++/79323
	* testsuite/20_util/duration/literals/range.cc: Prune extra output
	at -O0.

From-SVN: r245211
2017-02-06 16:39:56 +00:00
Gerald Pfeifer ef7df15338 documentation_hacking.xml: Remove obsolete link to DocBook Publishing Tools.
* doc/xml/manual/documentation_hacking.xml: Remove obsolete link
	to DocBook Publishing Tools.
	epubcheck has moved to GitHub.
	Update URL of the DocBook Element Reference; use that term as
	link description instead of "online".

From-SVN: r245205
2017-02-06 10:26:59 +00:00
Jonathan Wakely 10613537a9 PR libstdc++/66145 ensure new ABI for ios::failure tests
PR libstdc++/66145
	* testsuite/27_io/basic_ios/copyfmt/char/1.cc: Restore ABI override
	so new ios::failure can be caught even when old ABI is the default.
	* testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/
	exceptions_failbit.cc: Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
	exceptions_failbit.cc: Likewise.
	* testsuite/27_io/basic_istream/extractors_other/char/
	exceptions_null.cc: Likewise.
	* testsuite/27_io/basic_istream/extractors_other/wchar_t/
	exceptions_null.cc: Likewise.
	* testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
	* testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_other/char/
	exceptions_null.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_other/wchar_t/
	exceptions_null.cc: Likewise.
	* testsuite/27_io/ios_base/storage/2.cc: Likewise.

From-SVN: r245167
2017-02-03 19:26:51 +00:00
Jonathan Wakely b333e8ebb0 PR libstdc++/60936 reduce coupling between objects in libstdc++.a
Move explicit instantiation definitions for string I/O functions into
their own files so that iostream and locale definitions are not needed
for uses of strings without I/O. Move functions for throwing C++11
exceptions into the individual files defining the exception types, so
that using any of the functions from functexcept.cc doesn't pull in
large pieces of the C++11 library. Finally, avoid using __int_to_char in
snprintf_lite.cc to avoid pulling in locale-inst.cc for one function.

	PR libstdc++/60936
	* src/c++11/Makefile.am: Add new files.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++11/cow-string-inst.cc [!_GLIBCXX_USE_CXX11_ABI]
	(operator<<, operator>>, getline): Move explicit instantiations to ...
	* src/c++11/cow-string-io-inst.cc: ... new file.
	* src/c++11/cow-wstring-inst.cc [!_GLIBCXX_USE_CXX11_ABI]
	(operator<<, operator>>, getline): Move explicit instantiations to ...
	* src/c++11/cow-wstring-io-inst.cc: ... new file.
	* src/c++11/functexcept.cc (__throw_ios_failure, __throw_system_error)
	(__throw_future_error, __throw_bad_function_call):
	(__throw_regex_error): Move functions for C++11 exceptions to the
	files that define the exception types.
	* src/c++11/functional.cc (__throw_bad_function_call): Move here.
	* src/c++11/future.cc (__throw_future_error): Likewise.
	* src/c++11/ios.cc (__throw_ios_failure): Likewise.
	* src/c++11/regex.cc (__throw_regex_error): Likewise.
	* src/c++11/snprintf_lite.cc (__concat_size_t): Print decimal
	representation directly instead of calling __int_to_char.
	* src/c++11/sso_string.cc (__sso_string): New file for definition
	of __sso_string type.
	* src/c++11/string-io-inst.cc [_GLIBCXX_USE_CXX11_ABI]: New file for
	explicit instantiations of narrow string I/O functions.
	* src/c++11/system_error.cc (__throw_system_error): Move here.
	(__sso_string): Move to new file.
	* src/c++11/wstring-io-inst.cc [_GLIBCXX_USE_CXX11_ABI]: New file for
	explicit instantiations of wide string I/O functions.
	* src/c++98/misc-inst.cc [_GLIBCXX_USE_CXX11_ABI] (operator<<)
	(operator>>, getline): Remove explicit instantiations from here.

From-SVN: r245162
2017-02-03 18:59:05 +00:00
H.J. Lu b47507fe99 Update libstdc++ baseline symbols for x32
* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.

From-SVN: r245134
2017-02-02 12:18:43 -08:00
Rainer Orth a76745e690 Separate Solaris/SPARC and x86 baselines
* configure.host: Separate Solaris/SPARC and x86 baselines.
	* config/abi/post/solaris2.10/baseline_symbols.txt: Move ...
	* config/abi/post/sparc-solaris2.10/baseline_symbols.txt: ... here.
	* config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Move ...
	* config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
	... here.
	* config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Move ...
	* config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: ... here.
	* config/abi/post/i386-solaris2.10/baseline_symbols.txt: New file.
	* config/abi/post/solaris2.11/baseline_symbols.txt: Move ...
	* config/abi/post/sparc-solaris2.11/baseline_symbols.txt: ... here.
	* config/abi/post/solaris2.11/sparcv9/baseline_symbols.txt: Move ...
	* config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
	... here.
	* config/abi/post/solaris2.11/amd64/baseline_symbols.txt: Move ...
	* config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: ... here.
	* config/abi/post/i386-solaris2.11/baseline_symbols.txt: New file.

From-SVN: r245131
2017-02-02 16:24:03 +00:00
Rainer Orth f0272b9974 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.
	* config/abi/post/solaris2.11/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.11/amd64/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.11/sparcv9/baseline_symbols.txt: Likewise.

From-SVN: r245130
2017-02-02 16:23:11 +00:00
Jonathan Wakely 2cf9276ba7 PR78346 make <bits/predefined_ops.h> handle stashing iterators
PR libstdc++/78346
	* include/bits/predefined_ops.h (_Iter_equals_iter): Store iterator
	not its referent.
	(_Iter_comp_to_iter): Likewise.
	* testsuite/25_algorithms/search/78346.cc: New test.

From-SVN: r245090
2017-02-01 12:57:35 +00:00
Jonathan Wakely 11d10beb57 PR libstdc++/79254 simplify exception-safety in copy assignment
PR libstdc++/79254
	* config/abi/pre/gnu.ver: Remove recently added symbols.
	* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
	(basic_string::_M_copy_assign): Remove.
	(basic_string::operator=(const basic_string&)): Don't dispatch to
	_M_copy_assign. If source object is small just deallocate, otherwise
	perform new allocation before making any changes.
	* include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
	(basic_string::_M_copy_assign(const basic_string&, true_type)):
	Remove.
	* testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
	Test cases where the allocators are equal or the string is small.
	* testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
	Likewise.

From-SVN: r245085
2017-02-01 11:41:48 +00:00
Ville Voutilainen 1dd9523917 Implement LWG 2825, LWG 2756 breaks class template argument deduction for optional.
* include/std/optional: Add a deduction guide.
* testsuite/20_util/optional/cons/deduction_guide.cc: New.

From-SVN: r245024
2017-01-30 15:37:16 +02:00
Jonathan Wakely a7d47f3526 PR libstdc++/79254 fix exception-safety in std::string::operator=
PR libstdc++/79254
	* config/abi/pre/gnu.ver: Add new symbols.
	* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
	(basic_string::_M_copy_assign): New overloaded functions to perform
	copy assignment.
	(basic_string::operator=(const basic_string&)): Dispatch to
	_M_copy_assign.
	* include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
	(basic_string::_M_copy_assign(const basic_string&, true_type)):
	Define, performing rollback on exception.
	* testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
	Test exception-safety guarantee.
	* testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
	Likewise.
	* testsuite/util/testsuite_allocator.h (uneq_allocator::swap): Make
	std::swap visible.

From-SVN: r244986
2017-01-27 16:17:04 +00:00
Jonathan Wakely c86996727f PR libstdc++/70607 revert recent changes to <tr1/complex>
PR libstdc++/70607
	* include/tr1/complex (conj): Remove using-declaration and restore
	overloads, reverting previous change.

From-SVN: r244951
2017-01-26 19:40:02 +00:00
Jonathan Wakely 881191e865 Fix libstdc++ testsuite failures in C++98 and C++11 mode
* testsuite/23_containers/list/operations/78389.cc: Fix for C++11
	mode.
	* testsuite/23_containers/priority_queue/requirements/constructible.cc:
	Mark as unsupported in C++98 mode.
	* testsuite/23_containers/queue/requirements/constructible.cc:
	Likewise.
	* testsuite/23_containers/stack/requirements/constructible.cc:
	Likewise.
	* testsuite/25_algorithms/make_heap/movable.cc: Fix for C++11 mode.

From-SVN: r244950
2017-01-26 19:39:53 +00:00
Jonathan Wakely 3e5fb20f1f Fix namespace versioning and remove __detail::__identity helpers
PR libstdc++/79243
	* include/bits/c++config (literals::string_view_literals::__7): Add.
	Only declare versioned namespaces for the relevant C++ dialects.
	* include/experimental/bits/erase_if.h (fundamentals_v2::__detail):
	Add versioning macros.
	* include/experimental/bits/lfts_config.h:
	(fundamentals_v1::__detail::__7, fundamentals_v2::__detail::__7): Add.
	* include/experimental/string_view (fundamentals_v2::__detail):
	Add versioning macros.
	(fundamentals_v2::__detail::__identity): Remove.
	(fundamentals_v2::__detail::__idt): Use common_type instead of
	__detail::__identity.
	* include/std/string_view (__detail::__identity, __detail::__idt):
	Likewise.
	(literals::string_view_literals): Fix nesting of versioning macros.

From-SVN: r244945
2017-01-26 18:32:55 +00:00
Jason Merrill 5668970a07 * name-lookup.c (parse_using_directive): Deprecate strong using.
From-SVN: r244936
2017-01-26 10:32:22 -05:00
Jonathan Wakely bc9efeab61 PR libstdc++/79190 add fallback aligned_alloc implementation
libstdc++-v3:

	PR libstdc++/79190
	* libsupc++/del_opa.cc (operator delete(void*, std::align_val_t))
	[!_GLIBCXX_HAVE_ALIGNED_ALLOC && !_GLIBCXX_HAVE_POSIX_MEMALIGN
	&& !_GLIBCXX_HAVE_MEMALIGN && !_GLIBCXX_HAVE__ALIGNED_MALLOC]:
	Retrieve original pointer value allocated by malloc.
	* libsupc++/new_opa.cc [!_GLIBCXX_HAVE_ALIGNED_ALLOC
	&& !_GLIBCXX_HAVE_POSIX_MEMALIGN && !_GLIBCXX_HAVE_MEMALIGN
	&& !_GLIBCXX_HAVE__ALIGNED_MALLOC] (aligned_alloc(size_t, size_t)):
	Define, adjusting pointer value allocated by malloc and storing for
	retrieval by operator delete.

gcc/testsuite:

	PR libstdc++/79190
	* g++.dg/cpp1z/aligned-new3.C: Replace operator new so behaviour
	matches replaced operator delete.

From-SVN: r244933
2017-01-26 14:30:45 +00:00
Jakub Jelinek e6d55103c3 update-copyright.py: Add libhsail-rt to self.default_dirs and call self.add_dir on it.
contrib/
	* update-copyright.py: Add libhsail-rt to self.default_dirs
	and call self.add_dir on it.  Add Intel Corporation to external
	authors.
gcc/
	* brig-builtins.def: Update copyright years.
	* config/arm/arm_acle_builtins.def: Update copyright years.
gcc/brig/
	Update copyright years.
gcc/testsuite/
	* brig.dg/dg.exp: Update copyright years.
	* lib/brig-dg.exp: Update copyright years.
	* lib/brig.exp: Update copyright years.
libhsail-rt/
	Update copyright years.
libstdc++-v3/
	* libsupc++/eh_atomics.h: Update copyright years.
	* testsuite/20_util/unique_ptr/cons/default.cc: Update copyright years.

From-SVN: r244920
2017-01-26 09:26:48 +01:00
Jakub Jelinek 68edb9bafe update-copyright.py: Add libhsail-rt to self.default_dirs and call self.add_dir on it.
contrib/
	* update-copyright.py: Add libhsail-rt to self.default_dirs
	and call self.add_dir on it.  Add Intel Corporation to external
	authors.
gcc/
	* brig-builtins.def: Update copyright years.
	* config/arm/arm_acle_builtins.def: Update copyright years.
gcc/brig/
	Update copyright years.
gcc/testsuite/
	* brig.dg/dg.exp: Update copyright years.
	* lib/brig-dg.exp: Update copyright years.
	* lib/brig.exp: Update copyright years.
libhsail-rt/
	Update copyright years.
libstdc++-v3/
	* libsupc++/eh_atomics.h: Update copyright years.
	* testsuite/20_util/unique_ptr/cons/default.cc: Update copyright years.

From-SVN: r244919
2017-01-26 09:24:22 +01:00
Jonathan Wakely 536c221d20 PR libstdc++/70607 make proj(T) and conj(T) return complex<T>
PR libstdc++/61791
	PR libstdc++/70607
	* include/std/complex (real(T), imag(T)): Add _GLIBCXX_CONSTEXPR.
	(proj(T), conj(T)): Change return types per DR 1522.
	* include/tr1/complex (conj): Remove overloads and use std::conj.
	* testsuite/26_numerics/complex/dr781_dr1137.cc: Rename to...
	* testsuite/26_numerics/complex/dr781.cc: ... this, and update.
	* testsuite/26_numerics/complex/value_operations/constexpr2.cc: Test
	real(T) and imag(T). Allow testing for C++11 too.

From-SVN: r244900
2017-01-25 15:01:05 +00:00
Jonathan Wakely 8cb7179d24 PR libstdc++/79206 check string_view sizes in operator==
PR libstdc++/79206
	* include/experimental/string_view (operator==): Check sizes first.
	* include/std/string_view (operator==): Likewise.

From-SVN: r244865
2017-01-24 12:00:47 +00:00
Jonathan Wakely 11948d8394 Restore <functional> header to test
* testsuite/experimental/array/make_array.cc: Restore <functional>
	inclusion.

From-SVN: r244840
2017-01-23 23:59:08 +00:00
Thomas Preud'homme a750159e3b 69301.cc: Require atomic builtins.
2017-01-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    libstdc++-v3/
    * testsuite/29_atomics/atomic/69301.cc: Require atomic builtins.

From-SVN: r244819
2017-01-23 17:18:04 +00:00
Jonathan Wakely 61ad58f3aa PR libstdc++/79195 fix make_array type deduction
PR libstdc++/79195
	* include/experimental/array (__make_array_elem): New class template
	and partial specialization.
	(__is_reference_wrapper): Move into __make_array_elem specialization.
	(make_array): Use __make_array_elem to determine element type and move
	static assertion into specialization. Qualify std::forward call.
	(to_array): Add exception specifiation.
	* testsuite/experimental/array/make_array.cc: Test argument types
	without a common type.
	* testsuite/experimental/array/neg.cc: Adjust expected error message.

From-SVN: r244813
2017-01-23 15:56:05 +00:00
Gerald Pfeifer cd30831311 * doc/xml/manual/debug.xml: code.google.com uses https now.
From-SVN: r244770
2017-01-23 07:18:42 +00:00
Gerald Pfeifer 630f989317 * doc/xml/manual/test.xml: Fix link into gccint online manual.
From-SVN: r244765
2017-01-22 20:39:06 +00:00
Ville Voutilainen 509912a611 Make poisoned hashes SFINAE away the call operator of the hash.
* include/bits/functional_hash.h
(__poison_hash::__enable_hash_call): New.
* include/std/optional (__optional_hash_call_base): New.
(hash<optional<_Tp>>): Derive from the new base,
move the hash function into that base.
* include/std/variant (__variant_hash_call_base_impl): New.
(__variant_hash_call_base): Likewise.
(hash<variant<_Types...>>): Derive from the new base,
move the hash function into that base.
* testsuite/20_util/optional/hash.cc: Add tests for is_callable.
* testsuite/20_util/variant/hash.cc: Likewise.

From-SVN: r244748
2017-01-21 17:38:23 +02:00
Joe Seymour f14d2c52d4 Support unsigned __int20 in checks for size_t mangling
2017-01-20  Joe Seymour  <joe.s@somniumtech.com>

	* acinclude.m4 (GLIBCXX_CHECK_SIZE_T_MANGLING): Support uint20_t.
	* configure: Regenerate.

From-SVN: r244727
2017-01-20 17:46:36 +00:00
Jonathan Wakely 12905f106c PR69240 Define inequality operators for <random> param types
PR libstdc++/69240
	* include/bits/random.h (uniform_real_distribution::param_type)
	(normal_distribution::param_type, lognormal_distribution::param_type)
	(gamma_distribution::param_type, chi_squared_distribution::param_type)
	(cauchy_distribution::param_type, fisher_f_distribution::param_type)
	(student_t_distribution::param_type)
	(bernoulli_distribution::param_type, binomial_distribution::param_type)
	(geometric_distribution::param_type)
	(negative_binomial_distribution::param_type)
	(poisson_distribution::param_type)
	(exponential_distribution::param_type)
	(weibull_distribution::param_type)
	(extreme_value_distribution::param_type)
	(discrete_distribution::param_type)
	(piecewise_constant_distribution::param_type)
	(piecewise_linear_distribution::param_type): Define operator!=.
	* include/bits/uniform_int_dist.h
	(uniform_int_distribution::param_type): Likewise.
	* include/ext/random (beta_distribution::param_type)
	(rice_distribution::param_type, nakagami_distribution::param_type)
	(pareto_distribution::param_type, k_distribution::param_type)
	(arcsine_distribution::param_type, hoyt_distribution::param_type)
	(triangular_distribution::param_type)
	(von_mises_distribution::param_type)
	(hypergeometric_distribution::param_type)
	(logistic_distribution::param_type)
	(uniform_on_sphere_distribution::param_type)
	(uniform_inside_sphere_distribution::param_type): Likewise.
	* testsuite/26_numerics/random/bernoulli_distribution/cons/parms.cc:
	Test construction with param_type.
	* testsuite/26_numerics/random/binomial_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/chi_squared_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/exponential_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/extreme_value_distribution/cons/
	parms.cc: Likewise.
	* testsuite/26_numerics/random/fisher_f_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/gamma_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/geometric_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/lognormal_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/negative_binomial_distribution/cons/
	parms.cc: Likewise.
	* testsuite/26_numerics/random/normal_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/poisson_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/student_t_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/uniform_int_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/uniform_real_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/weibull_distribution/cons/parms.cc:
	Likewise.
	* testsuite/ext/random/arcsine_distribution/cons/parms.cc: Likewise.
	* testsuite/ext/random/beta_distribution/cons/parms.cc: Likewise.
	* testsuite/ext/random/hoyt_distribution/cons/parms.cc: Likewise.
	* testsuite/ext/random/hypergeometric_distribution/cons/parms.cc:
	Likewise.
	* testsuite/ext/random/k_distribution/cons/parms.cc: Likewise.
	* testsuite/ext/random/logistic_distribution/cons/parms.cc: Likewise.
	* testsuite/ext/random/nakagami_distribution/cons/parms.cc: Likewise.
	* testsuite/ext/random/normal_mv_distribution/cons/parms.cc: Likewise.
	* testsuite/ext/random/pareto_distribution/cons/parms.cc: Likewise.
	* testsuite/ext/random/rice_distribution/cons/parms.cc: Likewise.
	* testsuite/ext/random/triangular_distribution/cons/parms.cc:
	Likewise.
	* testsuite/ext/random/uniform_inside_sphere_distribution/cons/
	parms.cc: Likewise.
	* testsuite/ext/random/von_mises_distribution/cons/parms.cc: Likewise.

From-SVN: r244722
2017-01-20 15:28:48 +00:00
Jonathan Wakely 4dfdda108f PR72792 detect allocator pointer types without invalid rebinding
PR libstdc++/72792
	* include/bits/alloc_traits.h (__allocator_traits_base::__diff_type)
	(__allocator_traits_base::__size_type): Remove.
	(allocator_traits::_Ptr): New class template to detect const and void
	pointer types without instantiating pointer_traits::rebind
	unnecessarily.
	(allocator_traits::_Diff): Likewise for detecting difference_type.
	(allocator_traits::_Size): New class template to detect size_type
	without instantiating make_unsigned unnecessarily.
	* include/bits/ptr_traits.h (pointer_traits::element_type): Use
	__detected_or_t instead of __detected_or_t_.
	* include/std/type_traits (__detected_or_t_): Remove.
	* testsuite/20_util/allocator_traits/members/pointers.cc: New test.

From-SVN: r244706
2017-01-20 12:03:36 +00:00
Jonathan Wakely a3a1620bb8 PR72792 PR72793 relax requirements on rebind members
PR libstdc++/72792
	PR libstdc++/72793
	* include/bits/alloc_traits.h (__allocator_traits_base::__rebind):
	Replace with class template using void_t.
	(__alloc_rebind): Define in terms of
	__allocator_traits_base::__rebind.
	(allocator_traits): Remove unconditional static_assert for
	rebind_alloc.
	* include/bits/ptr_traits.h (__replace_first_arg): Remove type member.
	(pointer_traits::__rebind): Replace with class template using void_t.
	(pointer_traits::rebind): Define in terms of __rebind.
	(pointer_traits): Remove unconditional static_assert for rebind.
	* testsuite/20_util/allocator_traits/members/rebind_alloc.cc: New test.
	* testsuite/20_util/pointer_traits/rebind.cc: New test.

From-SVN: r244680
2017-01-20 02:36:16 +00:00
Jonathan Wakely 38a9e5a6c0 PR69321 fix any_cast<T>(any*) for non-copyable T
PR libstdc++/69321
	* include/experimental/any (__any_caster): Avoid instantiating
	manager function for types that can't be stored in any.
	* include/std/any (__any_caster): Likewise.
	* testsuite/20_util/any/misc/any_cast.cc: Test non-copyable type.
	* testsuite/experimental/any/misc/any_cast.cc: Likewise.

From-SVN: r244678
2017-01-20 01:22:54 +00:00
Jonathan Wakely 5b4ca3060a PR64903 simplify last fix to std::is_partitioned
PR libstdc++/64903
	* include/bits/stl_algo.h (is_partitioned): Use increment instead of
	std::advance.

From-SVN: r244675
2017-01-20 00:33:25 +00:00
Jonathan Wakely 115ac9ff61 PR79156 fix std::__enable_shared_from_this extension
PR libstdc++/79156
	* include/bits/shared_ptr_base.h (__enable_shared_from_this_base):
	Fix return type.
	(__enable_shared_from_this): Declare __shared_ptr as a friend.
	* testsuite/ext/shared_ptr/1.cc: New test.

From-SVN: r244668
2017-01-20 00:07:14 +00:00
Jonathan Wakely c4e5baa663 PR64903 fix number of predicate tests in std::is_partitioned
PR libstdc++/64903
	* include/bits/stl_algo.h (is_partioned): Don't retest the partition
	point.
	* testsuite/25_algorithms/is_partitioned/2.cc: New test.

From-SVN: r244661
2017-01-19 23:30:18 +00:00
Jonathan Wakely 8e4160112d Fix typo in recent doc updates
* doc/xml/manual/abi.xml: Fix typo.
	* doc/html/manual/abi.html: Likewise.

From-SVN: r244658
2017-01-19 23:15:13 +00:00
Jonathan Wakely 437f43cc78 PR67085 pass comparison functions by reference in heap algorithms
PR libstdc++/67085
	* include/bits/predefined_ops.h (_Iter_less_val, _Val_less_iter): Add
	converting constructors from _Iter_less_iter.
	(_Iter_comp_val, _Val_comp_iter): Add converting constructors from
	_Iter_comp_iter.
	(__iter_comp_val(_Iter_comp_iter<C>): Use converting constructor.
	(__val_comp_iter(_Iter_comp_iter<C>): Likewise.
	* include/bits/stl_heap.h (__is_heap_until, __push_heap, __pop_heap)
	(__make_heap, __sort_heap): Change _Compare parameters to references.
	(__is_heap, push_heap, __adjust_heap, __pop_heap, pop_heap)
	(__make_heap, make_heap, sort_heap, is_heap_until): Pass comparison
	functions as lvalues.
	(is_heap): Call __is_heap_until directly to avoid copying __comp.
	* testsuite/23_containers/priority_queue/67085.cc: Adjust test to
	count copies during construction with empty sequence.

From-SVN: r244656
2017-01-19 23:07:52 +00:00
Jonathan Wakely 9ade9945a0 Fix unsafe moves inside loops
PR libstdc++/67085
	* include/bits/stl_heap.h (__is_heap): Use _GLIBCXX_MOVE.
	(__make_heap, __sort_heap): Don't use _GLIBCXX_MOVE inside loops.
	* testsuite/23_containers/priority_queue/67085.cc: Adjust expected
	number of copies.
	* testsuite/25_algorithms/make_heap/movable.cc: New test.

From-SVN: r244650
2017-01-19 20:29:07 +00:00
Jonathan Wakely 45b48129d5 PR67085 move comparison functions in heap operations
PR libstdc++/67085
	* include/bits/stl_heap.h (push_heap, __adjust_heap, __pop_heap)
	(pop_heap, __make_heap, make_heap, __sort_heap, sort_heap): Use
	_GLIBCXX_MOVE when passing comparison function to other functions.
	(is_heap_until, is_heap): Use std::move when passing comparison
	function.
	* testsuite/23_containers/priority_queue/67085.cc: New test.

From-SVN: r244648
2017-01-19 18:26:41 +00:00
Jonathan Wakely 8c05647c56 PR78905 define _GLIBCXX_RELEASE macro
PR libstdc++/78905
	* doc/xml/manual/abi.xml (abi.versioning.history): Add markup to
	macro names, filenames, and literal values. Document _GLIBCXX_RELEASE.
	Document that the deprecated _GLIBCXX_VERSION macro was removed for
	the 4.0.0 release.
	* doc/html/*: Regenerate.
	* include/Makefile.am (_GLIBCXX_RELEASE): Set value.
	* include/Makefile.in: Regenerate.
	* include/bits/c++config (_GLIBCXX_RELEASE): Add #define.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Use lineno of 0 in
	dg-error.

From-SVN: r244642
2017-01-19 16:40:46 +00:00
Jonathan Wakely 2ae27b7076 PR69301 don't assume atomic<T> can default construct T
PR libstdc++/69301
	* include/std/atomic (atomic<T>::load, atomic<T>::exchange): Use
	aligned buffer instead of default-initialized variable.
	* testsuite/29_atomics/atomic/69301.cc: New test.
	* include/experimental/memory (observer_ptr::release): Use reserved
	name.
	* include/ext/pointer.h (_Pointer_adapter::operator++(int))
	(_Pointer_adapter::operator--(int)): Likewise.

From-SVN: r244588
2017-01-18 18:36:45 +00:00
Jonathan Wakely b08fdbb845 PR68925 don't use thread_local static for stateless object
PR libstdc++/68925
	* include/experimental/random (randint): Use temporary instead of
	thread_local static.

From-SVN: r244584
2017-01-18 17:18:47 +00:00
Joshua Conner 93f90f7bd5 crossconfig.m4: Add fuchsia OS.
2017-01-17  Joshua Conner  <joshconner@google.com>

	* crossconfig.m4: Add fuchsia OS.
	* configure: Regenerate.

From-SVN: r244557
2017-01-17 23:36:12 +00:00
Jonathan Wakely c6b8b5e4d3 PR69699 document why __GLIBCXX__ macro is useless
PR libstdc++/69699
	* doc/xml/manual/abi.xml (abi.versioning.history): Explain why the
	_GLIBCXX__ macro is not useful. Remove redundant date information
	and link to the GCC release timeline.
	(abi.versioning.active): Move partial sentence into the previous
	paragraph.
	* doc/html/*: Regenerate.

From-SVN: r244532
2017-01-17 15:26:11 +00:00
Jonathan Wakely 04c872aae4 PR79114 use decayed type in std::throw_with_nested assertion
PR libstdc++/79114
	* libsupc++/nested_exception.h (throw_with_nested): Use decay instead
	of remove_reference.
	* testsuite/18_support/nested_exception/79114.cc: New test.

From-SVN: r244531
2017-01-17 15:26:06 +00:00
Jakub Jelinek 3c36aa6ba2 re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
PR other/79046
	* configure: Regenerated.
config/
	* acx.m4 (GCC_BASE_VER): New m4 function.
	(ACX_TOOL_DIRS): Require GCC_BASE_VER, for
	--with-gcc-major-version-only use just major number from BASE-VER.
gcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	(CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
	(gcc.o): Depend on $(BASEVER).
	* common.opt (dumpfullversion): New option.
	* gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
	* doc/invoke.texi: Document -dumpfullversion.
	* doc/install.texi: Document --with-gcc-major-version-only.
	* configure: Regenerated.
libatomic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgomp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
libssp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
liboffloadmic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libquadmath/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libmpx/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libada/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
lto-plugin/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libitm/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
fixincludes/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libcilkrts/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libcc1/
	* configure.ac: Add GCC_BASE_VER.  For --with-gcc-major-version-only
	use just major number from BASE-VER.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libobjc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libstdc++-v3/
	* configure.ac: Add GCC_BASE_VER.
	* fragment.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* po/Makefile.in: Regenerated.
	* libsupc++/Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.
	* src/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* doc/Makefile.in: Regenerated.
	* python/Makefile.in: Regenerated.
	* src/c++11/Makefile.in: Regenerated.
	* src/c++98/Makefile.in: Regenerated.
	* src/filesystem/Makefile.in: Regenerated.
libvtv/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libsanitizer/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* libbacktrace/Makefile.in: Regenerated.
	* interception/Makefile.in: Regenerated.
	* asan/Makefile.in: Regenerated.
	* ubsan/Makefile.in: Regenerated.
	* configure: Regenerated.
	* sanitizer_common/Makefile.in: Regenerated.
	* lsan/Makefile.in: Regenerated.
	* Makefile.in: Regenerated.
	* tsan/Makefile.in: Regenerated.
libgfortran/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.

From-SVN: r244521
2017-01-17 10:38:48 +01:00
Jonathan Wakely 83291b8b8c PR66145 use new ABI for std::ios::failure exceptions
PR libstdc++/66145
	* src/c++11/functexcept.cc: Use new ABI for std::ios_base::failure
	exceptions.
	* testsuite/27_io/basic_ios/copyfmt/char/1.cc: Don't override ABI
	for test, so new ios::failure can be caught.
	* testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/
	exceptions_failbit.cc: Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
	exceptions_failbit.cc: Likewise.
	* testsuite/27_io/basic_istream/extractors_other/char/
	exceptions_null.cc: Likewise.
	* testsuite/27_io/basic_istream/extractors_other/wchar_t/
	exceptions_null.cc: Likewise.
	* testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
	* testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_other/char/
	exceptions_null.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_other/wchar_t/
	exceptions_null.cc: Likewise.
	* testsuite/27_io/ios_base/storage/2.cc: Likewise.

From-SVN: r244498
2017-01-16 15:58:06 +00:00
Jonathan Wakely b497fbc10a PR78702 fix accessibility of locale::facet::__shim
PR libstdc++/78702
	* include/bits/locale_classes.h (locale::facet::__shim): Change from
	private to protected.
	* src/c++11/cxx11-shim_facets.cc (__shim_accessor): Define helper to
	make locale::facet::__shim accessible.

From-SVN: r244491
2017-01-16 11:41:41 +00:00
Ville Voutilainen 53426b63b3 PR libstdc++/78389 fix backwards size adjustments.
PR libstdc++/78389
* include/bits/list.tcc (merge(list&&)): Fix backwards size adjustments.
(merge(list&&, _StrictWeakOrdering)): Likewise.
* testsuite/23_containers/list/operations/78389.cc: Add
better test for the sizes.

From-SVN: r244490
2017-01-16 13:36:33 +02:00
Jonathan Wakely ac4664f9da Skip tests that are incompatible with Profile Mode
* testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
	Skip test when -D_GLIBCXX_PROFILE mode is included in options.
	* testsuite/23_containers/map/modifiers/extract.cc: Likewise.
	* testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
	Likewise.
	* testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
	* testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
	* testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
	* testsuite/23_containers/set/modifiers/extract.cc: Likewise.
	* testsuite/23_containers/unordered_map/modifiers/extract.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/modifiers/extract.cc::
	Likewise.
	* testsuite/23_containers/unordered_multiset/modifiers/extract.cc::
	Likewise.
	* testsuite/23_containers/unordered_set/modifiers/extract.cc:
	Likewise.
	* testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
	Likewise.
	* testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
	* testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
	* testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
	* testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
	* testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.

From-SVN: r244464
2017-01-14 11:55:22 +00:00
Jonathan Wakely 0fdba3a81c PR65411 don't retry fclose on EINTR
PR libstdc++/65411
	* config/io/basic_file_stdio.cc (__basic_file<char>::close()): Don't
	retry fclose on EINTR.

From-SVN: r244451
2017-01-13 17:52:34 +00:00
Jonathan Wakely aa1ba96b87 Remove unused include from Profile Mode header
* include/profile/base.h: Remove unused header that leads to header
	cycle in C++17 mode.

From-SVN: r244449
2017-01-13 17:20:23 +00:00
Jonathan Wakely 92daf2dedd Add string_view support to COW std::string
PR libstdc++/79075
	* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string):
	Make _If_sv private.
	[!_GLIBCXX_USE_CXX11_ABI] (basic_string): Add member functions taking
	basic_string_view arguments.

From-SVN: r244445
2017-01-13 15:53:07 +00:00
Jonathan Wakely 90aa73309e Define cxx11-abi effective target for libstdc++ tests
PR libstdc++/79075
	* testsuite/lib/libstdc++.exp (check_v3_target_filesystem_ts): Remove
	redundant option from cxxflags.
	(check_effective_target_cxx11-abi): Define.
	* testsuite/21_strings/basic_string/allocator/71964.cc: Use cxx11-abi
	effective target.
	* testsuite/21_strings/basic_string/allocator/char/copy.cc: Likewise.
	* testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/char/minimal.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/char/move.cc: Likewise.
	* testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/char/swap.cc: Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
	Likewise.
	* testsuite/23_containers/list/61347.cc: Likewise.
	* testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
	* testsuite/27_io/ios_base/failure/cxx11.cc: Likewise.

From-SVN: r244440
2017-01-13 14:57:33 +00:00
Ville Voutilainen e5dcfacf43 re PR libstdc++/78389 (list::merge and list::sort are not exception safe)
PR libstdc++/78389
* include/bits/list.tcc (merge(list&&)):
Adjust list sizes if the comparator throws.
(merge(list&&, _StrictWeakOrdering)): Likewise.
(sort()): Splice elements back from the scratch buffers
if the comparator throws.
(sort(_StrictWeakOrdering)): Likewise.
* testsuite/23_containers/list/operations/78389.cc: New.

From-SVN: r244439
2017-01-13 16:46:25 +02:00
Jonathan Wakely 45cac8baeb Mark test as XFAIL for C++17 mode
* testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Mark
	XFAIL for C++17 until node reinsertion supports fancy pointers.

From-SVN: r244436
2017-01-13 13:01:48 +00:00
Jonathan Wakely c6ab906191 PR78361 recognise noexcept functions as referenceable
2017-01-13  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/78361
	* testsuite/20_util/add_pointer/value.cc: Test forming function
	pointers.

2017-01-13  Michael Brune  <lucdanton@free.fr>

	PR libstdc++/78361
	* include/std/type_traits (__is_referenceable): Handle noexcept
	function types.

From-SVN: r244432
2017-01-13 12:18:42 +00:00
Jonathan Wakely a1f009a65f PR77528 partially revert r244278 and define default constructors
PR libstdc++/77528
	* include/bits/stl_queue.h (queue, priority_queue): Remove default
	member-initializers and define default constructors as templates with
	constraints.
	* include/bits/stl_stack.h (stack): Likewise.
	* testsuite/23_containers/priority_queue/requirements/constructible.cc:
	New.
	* testsuite/23_containers/priority_queue/requirements/
	explicit_instantiation/1.cc: Test more instantiations.
	* testsuite/23_containers/priority_queue/requirements/
	explicit_instantiation/1_c++98.cc: Likewise.
	* testsuite/23_containers/queue/requirements/constructible.cc: New.
	* testsuite/23_containers/stack/requirements/constructible.cc: New.

From-SVN: r244374
2017-01-12 17:28:36 +00:00
Jonathan Wakely 4704f28e7a PR66284 remove std::function special case for reference_wrapper
PR libstdc++/66284
	* doc/xml/manual/intro.xml: Document LWG 2781 change.
	* doc/html/*: Regenerate.
	* include/std/functional (_Function_base::_Ref_manager): Remove.
	(_Function_handler): Remove partial specializations for
	reference_wrapper.
	(function::target): Remove special case for const qualification.
	* testsuite/20_util/function/6.cc: Adjust tests for target type.
	* testsuite/20_util/function/7.cc: Likewise.
	* testsuite/20_util/function/8.cc: Likewise.

From-SVN: r244364
2017-01-12 14:28:38 +00:00
Jonathan Wakely b744bf4e18 PR78134 fix return types of heterogeneous lookup functions
PR libstdc++/78134
	* include/bits/stl_map.h (map::lower_bound, map::upper_bound)
	(map::equal_range): Fix return type of heterogeneous overloads.
	* include/bits/stl_multimap.h (multimap::lower_bound)
	(multimap::upper_bound, multimap::equal_range): Likewise.
	* include/bits/stl_multiset.h (multiset::lower_bound)
	(multiset::upper_bound, multiset::equal_range): Likewise.
	* include/bits/stl_set.h (set::lower_bound, set::upper_bound)
	(set::equal_range): Likewise.
	* testsuite/23_containers/map/operations/2.cc
	* testsuite/23_containers/multimap/operations/2.cc
	* testsuite/23_containers/multiset/operations/2.cc
	* testsuite/23_containers/set/operations/2.cc

From-SVN: r244318
2017-01-11 14:44:15 +00:00
Jonathan Wakely b091b8dc0b PR78273 fix count to work with partitioning function
PR libstdc++/78273
	* include/bits/stl_map.h (map::count<_Kt>(const _Kt&)): Don't assume
	the heterogeneous comparison can only find one match.
	* include/bits/stl_set.h (set::count<_Kt>(const _Kt&)): Likewise.
	* testsuite/23_containers/map/operations/2.cc: Test count works with
	comparison function that just partitions rather than sorting.
	* testsuite/23_containers/set/operations/2.cc: Likewise.

From-SVN: r244317
2017-01-11 14:44:04 +00:00
Ville Voutilainen f3df0b3cde Reduce the size of variant, it doesn't need an index of type size_t internally.
Reduce the size of variant, it doesn't need an index of
type size_t internally.
* include/std/variant (parse_numbers.h): New include.
(__select_index): New.
(_Variant_storage<false, _Types...>::_M_reset_impl): Use
_index_type for comparison with variant_npos.
(_Variant_storage<false, _Types...>::__index_type): New.
(_Variant_storage<false, _Types...>::_M_index): Change the
type from size_t to __index_type.
(_Variant_storage<true, _Types...>::__index_type): New.
(_Variant_storage<true, _Types...>::_M_index): Change the
type from size_t to __index_type.
(_Variant_base::_M_valid): Use _Storage::__index_type
for comparison with variant_npos.
(variant::index): Use _Base::_Storage::__index_type
for comparison with variant_npos.
* testsuite/20_util/variant/index_type.cc: New.

From-SVN: r244309
2017-01-11 13:23:43 +02:00
Jonathan Wakely 904112f6bb Adjust effective target selector to fix C++17 FAIL
* testsuite/18_support/exception_ptr/60612-unexpected.cc: Adjust
	effective target selector to prevent running in C++17 mode.

From-SVN: r244280
2017-01-10 17:44:42 +00:00
Jonathan Wakely d2e1d4b713 PR77528 add default constructors for container adaptors
PR libstdc++/77528
	* include/bits/stl_queue.h (queue::c): Add default member initializer.
	(queue::queue()): Add constructor and define as defaulted.
	(queue::queue(_Sequence&&)): Remove default argument.
	(priority_queue::c, priority_queue::comp): Add default member
	initializers.
	(priority_queue::priority_queue()): Add constructor and define as
	defaulted.
	(priority_queue::priority_queue(const _Compare&, _Sequence&&)):
	Remove default argument for first parameter.
	* include/bits/stl_stack.h (stack::c): Add default member initializer.
	(stack::stack()): Add constructor and define as defaulted.
	(stack::stack(const _Sequence&)): Remove default argument.
	* testsuite/23_containers/priority_queue/requirements/
	explicit_instantiation/1.cc: Test explicit instantiation with
	non-DefaultConstructible sequence.
	* testsuite/23_containers/priority_queue/77528.cc: New test.
	* testsuite/23_containers/priority_queue/requirements/
	explicit_instantiation/1_c++0x.cc: Replace with 1_c++98.cc.
	* testsuite/23_containers/queue/77528.cc: New test.
	* testsuite/23_containers/queue/requirements/explicit_instantiation/
	1.cc: Test explicit instantiation with non-DefaultConstructible
	sequence.
	* testsuite/23_containers/queue/requirements/explicit_instantiation/
	1_c++0x.cc: Replace with 1_c++98.cc.
	* testsuite/23_containers/stack/77528.cc: New test.
	* testsuite/23_containers/stack/requirements/explicit_instantiation/
	1.cc: Test explicit instantiation with non-DefaultConstructible
	sequence.
	* testsuite/23_containers/stack/requirements/explicit_instantiation/
	1_c++0x.cc: Replace with 1_c++98.cc.

From-SVN: r244278
2017-01-10 17:30:20 +00:00
Felipe Magno de Almeida 26b67e383f Use temporary int objects to access struct tm members
Call _M_extract_* functions family through temporary int objects, so
it doesn't convert from lvalue to rvalue through a temporary in AVR
because of the incompatible types used in AVR-Libc.

This fixes compilation errors with AVR-Libc while compiling libstdc++
for AVR target.

2017-01-10  Felipe Magno de Almeida <felipe@expertisesolutions.com.br>

	* include/bits/locale_facets_nonio.tcc
	(time_get::_M_extract_via_format): Avoid compilation errors with
	non-standard struct tm.

From-SVN: r244271
2017-01-10 14:15:59 +00:00
François Dumont f9a27859df Make Python printers and xmethods work with versioned namespace
2017-01-10  François Dumont  <fdumont@gcc.gnu.org>
	    Jonathan Wakely  <jwakely@redhat.com>

	* python/libstdcxx/v6/printers.py (_versioned_namespace): Define.
	(is_specialization, strip_versioned_namespace): New helpers functions
	to work with symbols in the versioned namespace.
	(Printer.add_version): Add second name using versioned namespace.
	(add_one_template_type_printer, add_one_type_printer): Add second
	type printers using versioned namespace.
	(register_type_printers): Add template type printer for basic_string.
	(build_libstdcxx_dictionary): Remove dead code.
	* python/libstdcxx/v6/xmethods.py: Make all matchers look for
	versioned namespace.
	* testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
	results.
	* testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.

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

From-SVN: r244262
2017-01-10 12:38:42 +00:00
Jonathan Wakely a7765de8ef PR79017 workaround incomplete C99 math on darwin
PR libstdc++/79017
	* acinclude.m4 (GLIBCXX_CHECK_C99_TR1): Check for llrint and llround
	functions separately on darwin and if they're missing define
	_GLIBCXX_NO_C99_ROUNDING_FUNCS.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* include/c_global/cmath [_GLIBCXX_NO_C99_ROUNDING_FUNCS] (llrint)
	(llrintf, llrintl, llround, llroundf, llroundl): Do not define.

From-SVN: r244231
2017-01-09 17:15:58 +00:00
Jonathan Wakely dc8bc65be3 Define testsuite macro for correct thread_local destructors
* testsuite/30_threads/condition_variable/members/3.cc: Use new macro
	to detect correct thread_local destructors.
	* testsuite/util/testsuite_hooks.h (CORRECT_THREAD_LOCAL_DTORS):
	Define.

From-SVN: r244226
2017-01-09 13:06:03 +00:00
Jonathan Wakely cb627cdf5c PR66414 optimize std::string::find
2017-01-09  Jonathan Wakely  <jwakely@redhat.com>
	    Aditya Kumar  <hiraditya@msn.com>

	PR libstdc++/66414
	* include/bits/basic_string.tcc
	(basic_string::find(const CharT*, size_type, size_type)): Optimize.

Co-Authored-By: Aditya Kumar <hiraditya@msn.com>

From-SVN: r244225
2017-01-09 13:05:58 +00:00
Jonathan Wakely 3330ac383c Add more tests for std::basic_string::find
* testsuite/21_strings/basic_string/operations/find/char/6.cc: New.
	* testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc: New.

From-SVN: r244185
2017-01-06 21:22:40 +00:00
Jonathan Wakely 3907f9e59c Add missing <cassert> include to testcase
* testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp:
	Include <cassert> header.

From-SVN: r244176
2017-01-06 17:51:24 +00:00
Jonathan Wakely ea4ad78e2c Check for __cxa_thread_atexit for freebsd crosses
PR libstdc++/78968
	* crossconfig.m4: Check for __cxa_thread_atexit on *-*-freebsd*.
	* configure: Regenerate.

From-SVN: r244169
2017-01-06 17:06:24 +00:00
Barrett Adair 258ee761eb Use fold expressions to reduce std::variant instantiation depth
2017-01-06  Barrett Adair  <barrettellisadair@gmail.com>
	    Jonathan Wakely  <jwakely@redhat.com>

	* include/std/variant (variant, swap): Replace __and_ usage with fold
	expressions.

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

From-SVN: r244163
2017-01-06 15:27:01 +00:00
Rainer Orth 1ec62aa9e1 Build libgo with -Wa,-nH if possible (PR go/78978) [non-libgo parts]
libstdc++-v3:
	PR go/78978
	* acinclude.m4 (GLIBCXX_CHECK_ASSEMBLER_HWCAP): Remove.
	* configure.ac: Call GCC_CHECK_ASSEMBLER_HWCAP instead of
	GLIBCXX_CHECK_ASSEMBLER_HWCAP.
	* fragment.am (CONFIG_CXXFLAGS): Use HWCAP_CFLAGS instead of
	HWCAP_FLAGS.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in, doc/Makefile.in, include/Makefile.in,
	libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in,
	src/Makefile.in, src/c++11/Makefile.in, src/c++98/Makefile.in,
	src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.

	config:
	PR go/78978
	* hwcaps.m4 (GCC_CHECK_ASSEMBLER_HWCAP): New macro.

From-SVN: r244162
2017-01-06 14:33:47 +00:00
Jonathan Wakely 8b790281d5 Don't redefine _GLIBCXX_ASSERTIONS if already defined
* include/bits/c++config (_GLIBCXX_ASSERTIONS): Avoid redefinition.

From-SVN: r244151
2017-01-06 12:34:11 +00:00
Jonathan Wakely 6807f08628 PR78991 make __gnu_cxx::__ops constructors explicit
PR libstdc++/78991
	* include/bits/predefined_ops.h (_Iter_comp_iter, _Iter_comp_val)
	(_Val_comp_iter, _Iter_equals_val, _Iter_pred, _Iter_comp_to_val)
	(_Iter_comp_to_iter, _Iter_negate): Make constructors explicit and
	move function objects.
	(__iter_comp_iter, __iter_comp_val, __val_comp_iter, __pred_iter)
	(__iter_comp_val, __iter_comp_iter, __negate): Move function objects.
	* testsuite/25_algorithms/sort/78991.cc: New test.

From-SVN: r244150
2017-01-06 12:33:58 +00:00