Commit Graph

9832 Commits

Author SHA1 Message Date
Uros Bizjak
3263979465 baseline_symbols.txt: Update.
* config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r249418
2017-06-20 17:50:57 +02:00
Rainer Orth
67ea3f4e0f Always check for target i?86 and x86_64
libstdc++-v3:
	* testsuite/20_util/variant/index_type.cc: Allow for all ilp32 and
	lp64 targets.

	gcc/testsuite:
	* c-c++-common/fold-masked-cmp-1.c: Allow for i?86-*-* target.
	* c-c++-common/fold-masked-cmp-2.c: Likewise.
	* c-c++-common/fold-masked-cmp-3.c: Likewise.
	* g++.dg/cpp0x/alignas4.C: Allow for i?86-*-* target, don't
	restrict to x86_64-*-*-gnu.
	Skip scan-assembler on *-*-darwin*.
	* g++.dg/vect/pr70944.cc: Allow for i?86-*-* target.
	* gcc.dg/loop-invariant.c: Likewise.
	* gcc.dg/lto/pr70955_0.c: Likewise.
	* gcc.dg/tree-ssa/pr69196-1.c: Likewise.
	* gcc.dg/tree-ssa/pr79803.c: Likewise.
	* gfortran.dg/pr68078.f90: Allow for i?86-*-linux*.

	* g++.dg/debug/dwarf2/const2b.C: Allow for x86_64-*-* target.
	* gcc.dg/attr-ms_struct-1.c: Allow for all i?86-*-*, x86_64-*-*
	targets.
	* gcc.dg/attr-ms_struct-2.c: Likewise.
	* gcc.dg/attr-ms_struct-packed1.c: Likewise.
	* gcc.dg/bf-ms-layout.c: Likewise.
	* gcc.dg/bf-ms-layout-2.c: Likewise.
	* gcc.dg/pic-macro-define.c: Remove target restrictions.
	Require fpic support.
	* gcc.target/i386/bitfield1.c: Allow for all i?86-*-*, x86_64-*-*
	targets.
	* gcc.target/i386/bitfield2.c: Likewise.
	* gcc.target/i386/darwin-fpmath.c: Allow for x86_64-*-darwin*
	targets.
	* gfortran.dg/fmt_pf.f90: Remove i?86-*-solaris2.9* from xfail.

From-SVN: r249409
2017-06-20 13:01:32 +00:00
Rainer Orth
a06a538548 Update Solaris baselines for GCC 8.0 (PR libstdc++/81092)
* config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
	* config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
	* config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
	* config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
	* config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
	* config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
	Likewise.
	* config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
	* config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
	Likewise.

From-SVN: r249362
2017-06-19 10:06:41 +00:00
H.J. Lu
82aa64e5af x32: Update baseline_symbols.txt
PR libstdc++/81092
	* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.

From-SVN: r249349
2017-06-18 09:43:53 -07:00
Andreas Schwab
60a51885f2 re PR libstdc++/81092 (Missing symbols for new std::wstring constructors)
PR libstdc++/81092
* config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r249348
2017-06-18 14:36:02 +00:00
Rainer Orth
4f4b0ab85f Get rid of dg-skip-if etc. default args
libstdc++-v3:
	* testsuite: Remove dg-skip-if, dg-xfail-if, dg-xfail-run-if
	default args.

	libgomp:
	* testsuite/libgomp.fortran/strassen.f90: Remove dg-skip-if
	default args.
	* testsuite/libgomp.oacc-c-c++-common/vprop.c: Remove
	dg-xfail-run-if default args.

	gcc/testsuite:
	Remove dg-skip-if, dg-xfail-if, dg-xfail-run-if default args.

From-SVN: r249339
2017-06-17 15:32:28 +00:00
Jonathan Wakely
14d8a91212 PR libstdc++/80893 don't run test for C++98 modes
PR libstdc++/80893
	* testsuite/23_containers/vector/bool/80893.cc: Add { target c++11 }.

From-SVN: r249338
2017-06-17 13:11:47 +01:00
Jonathan Wakely
78a8b676f1 Add std::get_deleter overload with correct signature
* include/bits/shared_ptr.h (get_deleter): Add overload matching
	standard signature.
	* include/bits/shared_ptr_base.h (__shared_ptr): Declare new
	get_deleter overload as a friend.
	* testsuite/20_util/shared_ptr/misc/get_deleter.cc: New.

From-SVN: r249267
2017-06-16 16:20:14 +01:00
Jakub Jelinek
fb7a163397 re PR libstdc++/81092 (Missing symbols for new std::wstring constructors)
PR libstdc++/81092
	* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.

From-SVN: r249260
2017-06-16 16:29:55 +02:00
Jonathan Wakely
bfe8a528aa Fix std::wbuffer_convert::sync()
* include/bits/locale_conv.h (wbuffer_convert::sync): Fix condition.
	* testsuite/22_locale/conversions/buffer/2.cc: New.

From-SVN: r249255
2017-06-16 14:23:42 +01:00
Jonathan Wakely
4317778a9b PR libstdc++/81092 add std::wstring symbols and bump library version
PR libstdc++/81092
	* acinclude.m4: Bump libtool_VERSION.
	* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
	* config/abi/pre/gnu.ver: Add wstring constructor symbols to
	GLIBCXX_3.4.24 version and move random_device::_M_get_entropy() symbol
	to new GLIBCXX_3.4.25 version.
	* doc/xml/manual/abi.xml: Document new versions.
	* doc/html/*: Regenerate.
	* testsuite/21_strings/basic_string/cons/char/8.cc: Use base object
	constructors to ensure required symbols are exported.
	* testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
	* testsuite/util/testsuite_abi.cc: Add new version.

From-SVN: r249246
2017-06-16 12:54:59 +01:00
Jonathan Wakely
6ec3c9c841 Fix missing returns in libstdc++ header and tests
* include/bits/locale_conv.h (wbuffer_convert::_M_put): Add missing
	return statement.
	* testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
	Return void.
	* testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
	Likewise.
	* testsuite/23_containers/map/modifiers/insert_or_assign/1.cc: Add
	missing return statements.
	* testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
	Likewise.
	* testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc:
	Return void.
	* testsuite/special_functions/14_expint/pr68397.cc: Likewise.

From-SVN: r249238
2017-06-16 09:13:37 +01:00
François Dumont
7d594224c2 stl_bvector.h (__fill_bvector(_Bit_type*, unsigned int, unsigned int, bool)): Change signature.
2017-06-16  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/stl_bvector.h
	(__fill_bvector(_Bit_type*, unsigned int, unsigned int, bool)):
	Change signature.
	(std::fill(_Bit_iterator, _Bit_iterator, bool)): Adapt.
	(_Bvector_impl_data): New.
	(_Bvector_impl): Inherits from latter.
	(_Bvector_impl(_Bit_alloc_type&&)): Delete.
	(_Bvector_impl(_Bvector_impl&&)): New, default.
	(_Bvector_base()): Default.
	(_Bvector_base(_Bvector_base&&)): Default.
	(_Bvector_base::_M_move_data(_Bvector_base&&)): New.
	(vector(vector&&, const allocator_type&)): Use latter.
	(vector<bool>::operator=(vector&&)): Likewise.
	(vector<bool>::vector()): Default.
	(vector<bool>::vector(vector&&)): Default.
	(vector<bool>::assign(_InputIterator, _InputIterator)): Use
	_M_assign_aux.
	(vector<bool>::assign(initializer_list<bool>)): Likewise.
	(vector<bool>::_M_initialize_value(bool)): New.
	(vector<bool>(size_type, const bool&, const allocator_type&)): Use
	latter.
	(vector<bool>::_M_initialize_dispatch(_Integer, _Integer, __true_type)):
	Likewise.
	(vector<bool>::_M_fill_assign(size_t, bool)): Likewise.

From-SVN: r249235
2017-06-16 05:28:06 +00:00
François Dumont
0356a0749b 2017-06-15 François Dumont <fdumont@gcc.gnu.org>
* src/c++98/tree.cc  [!_GLIBCXX_INLINE_VERSION]
	(_Rb_tree_rotate_left, _Rb_tree_rotate_right): Delete.

From-SVN: r249226
2017-06-15 20:32:09 +00:00
Rainer Orth
d12366802a Use pthread effective-target in testsuite
* testsuite: Add dg-require-effective-target pthread to -pthread
	tests.
	Remove explicit target lists from dg-do and dg-options.

	* testsuite/30_threads/async/forced_unwind.cc: Remove explit
	target list from dg-options.
	* testsuite/30_threads/packaged_task/forced_unwind.cc: Likewise.

	* 30_threads/shared_mutex/cons/1.cc: Likewise.
	Pass -pthread for all targets.
	* 30_threads/shared_mutex/try_lock/1.cc: Likewise.
	* 30_threads/shared_mutex/try_lock/2.cc: Likewise.
	* 30_threads/shared_mutex/unlock/1.cc: Likewise.

	* testsuite/30_threads/this_thread/57060.cc: Require c++11 via
	dg-require-effective-target.

From-SVN: r249217
2017-06-15 12:18:05 +00:00
Jonathan Wakely
cdd17d6e99 Fix libstdc++ testsuite failures with -D_GLIBCXX_USE_CXX11_ABI=0
* doc/xml/manual/test.xml: Correct instructions on running tests.
	* testsuite/21_strings/basic_string/cons/char/deduction.cc: Adjust to
	pass when -D_GLIBCXX_USE_CXX11_ABI=0 added to RUNTESTFLAGS.
	* testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
	Likewise.
	* testsuite/27_io/basic_ios/copyfmt/char/1.cc: Likewise.
	* 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: r249206
2017-06-14 20:38:30 +01:00
Pedro Alves
b51483f48f Finish implementing P0426R1 "Constexpr for std::char_traits" for C++17
As discussed in PR c++/80265 ("__builtin_{memcmp,memchr,strlen} are
not usable in constexpr functions"), use __builtin_constant_p to tell
whether we can defer to a constexpr algorithm.

I used __always_inline__ just to be thorough.  It isn't really really
necessary as far as I could determine.

Changes like these:

	 if (__n == 0)
	   return 0;
 -	return wmemcmp(__s1, __s2, __n);
 +	else
 +	  return wmemcmp(__s1, __s2, __n);

are necessary otherwise G++ complains that we're calling a
non-constexpr function, which looks like a a manifestation of PR67026
to me.

libstdc++-v3:
2017-06-12  Pedro Alves  <palves@redhat.com>

	* doc/xml/manual/status_cxx2017.xml: Update C++17 constexpr
	char_traits status.
	* doc/html/*: Regenerate.

	* include/bits/char_traits.h (_GLIBCXX_ALWAYS_INLINE): Define if
	not already defined.
	(__cpp_lib_constexpr_char_traits): Uncomment.
	(__constant_string_p, __constant_char_array_p): New.
	(std::char_traits<char>, std::char_traits<wchar_t>): Add
	_GLIBCXX17_CONSTEXPR on compare, length and find and use
	__constant_string_p, __constant_char_array_p and
	__builtin_constant_p to defer to __gnu_cxx::char_traits at compile
	time.

	* testsuite/21_strings/char_traits/requirements/
	constexpr_functions_c++17.cc: Uncomment
	__cpp_lib_constexpr_char_traits tests.  Uncomment
	test_compare<char>, test_length<char>, test_find<char>,
	test_compare<wchar_t>, test_length<wchar_t> and test_find<wchar_t>
	static_assert tests.

From-SVN: r249137
2017-06-12 22:22:39 +00:00
François Dumont
07cfc2d75d stl_tree.h (_Rb_tree_impl()): Restore _Node_allocator default init.
2017-06-12  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/stl_tree.h (_Rb_tree_impl()): Restore _Node_allocator
	default init.
	* testsuite/util/testsuite_allocator.h
	(__gnu_test::default_init_allocator<>) New.
	* testsuite/23_containers/set/allocator/default_init.cc: New.
	* testsuite/23_containers/map/allocator/default_init.cc: New.

From-SVN: r249136
2017-06-12 20:38:16 +00:00
Jonathan Wakely
754d67d5ba PR libstdc++/55917 do not handle exceptions in std::thread
PR libstdc++/55917
	* src/c++11/thread.cc (execute_native_thread_routine): Remove
	try-block so that exceptions propagate out of the thread and terminate
	is called by the exception-handling runtime.
	(execute_native_thread_routine_compat): Likewise.
	* testsuite/30_threads/thread/cons/terminate.cc: New.

From-SVN: r249130
2017-06-12 17:37:28 +01:00
Jonathan Wakely
53d01fd9e9 Support move-only deleters in std::shared_ptr (LWG 2802)
* doc/xml/manual/intro.xml: Document LWG 2802, 2873 and 2942 changes.
	* include/bits/shared_ptr.h (shared_ptr): Use rvalues for deleters
	(LWG 2802).
	* include/bits/shared_ptr_base.h (_Sp_ebo_helper, _Sp_counted_deleter
	(_Sp_counted_deleter::_Impl, __shared_count, __shared_ptr): Likewise.
	* testsuite/20_util/shared_ptr/cons/lwg2802.cc: New.

From-SVN: r249061
2017-06-09 14:20:37 +01:00
Jonathan Wakely
225ab2b07b Add deduction guides for sequence containers (P0433R2, partial)
* include/bits/forward_list.h (forward_list): Add deduction guide.
	* include/bits/stl_deque.h (deque): Likewise.
	* include/bits/stl_list.h (list): Likewise.
	* include/bits/stl_vector.h (vector): Likewise.
	* testsuite/23_containers/deque/cons/deduction.cc: New.
	* testsuite/23_containers/forward_list/cons/deduction.cc: New.
	* testsuite/23_containers/list/cons/deduction.cc: New.
	* testsuite/23_containers/vector/cons/deduction.cc: New.

From-SVN: r249054
2017-06-09 12:04:53 +01:00
Jonathan Wakely
853ed6bc10 PR libstdc++/81017 add noexcept to std::function move operations
PR libstdc++/81017
	* include/bits/std_function.h (function::function(function&&))
	(function::operator=(funtion&&)): Add noexcept.
	* testsuite/20_util/function/assign/move.cc: Check for noexcept.
	* testsuite/20_util/function/cons/move.cc: Likewise.

From-SVN: r249018
2017-06-08 15:27:45 +01:00
Jonathan Wakely
bfd88d1df1 Add C++17 deduction guide for std::basic_regex (P0433R2, partial)
* include/bits/regex.h (basic_regex): Add deduction guide from P0433.
	* testsuite/28_regex/basic_regex/ctors/deduction.cc: New.

From-SVN: r248990
2017-06-07 16:43:54 +01:00
Jonathan Wakely
d840779ff4 PR libstdc++/81002 fix std::basic_regex range constructor
PR libstdc++/81002
	* include/bits/regex.h (basic_regex): Adjust call to __compile_nfa
	so iterator type is deduced.
	* include/bits/regex_compiler.h (__compile_nfa): Reorder template
	parameters to allow iterator type to be deduced.
	* testsuite/28_regex/basic_regex/ctors/basic/iter.cc: New.

From-SVN: r248989
2017-06-07 16:43:35 +01:00
Jonathan Wakely
6d82c56288 Add C++17 deduction guide for std::basic_string (P0433R2, partial)
* include/bits/alloc_traits.h (__is_allocator, _RequireAllocator):
	New trait and alias for detecting Allocator-like types.
	* include/bits/basic_string.h (basic_string): Add deduction guide
	from P0433.
	* include/ext/alloc_traits.h (__gnu_cxx::__alloc_traits): Add template
	parameter with default template argument that causes substitution
	failures for types that cannot be allocators.
	* testsuite/21_strings/basic_string/cons/char/deduction.cc: New.
	* testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc: New.

From-SVN: r248967
2017-06-07 13:35:08 +01:00
Jonathan Wakely
94895bd98d PR libstdc++/80939 Remove unmeetable constexpr specifiers
PR libstdc++/80939
	* include/std/variant (__erased_ctor, __erased_assign, __erased_swap)
	(__erased_hash): Remove constexpr specifier and qualify calls to
	__ref_cast.
	(__erased_dtor): Remove constexpr specifier and use _Destroy.

From-SVN: r248881
2017-06-05 17:49:04 +01:00
Jonathan Wakely
6c24177862 Optimize std::advance for single increments
* include/bits/stl_iterator_base_funcs.h
	(__advance<_RandomAccessIterator, _Distance>): Optimize for next/prev
	cases where incrementing or decrementing a single step.

From-SVN: r248875
2017-06-05 11:34:13 +01:00
Jonathan Wakely
d08606ce6c Add noexcept to shared_ptr owner comparisons (LWG 2873)
* include/bits/shared_ptr_base.h (__shared_ptr::owner_before)
	(__weak_ptr::owner_before, _Sp_owner_less::operator()): Add noexcept
	specifiers as per LWG 2873 and LWG 2942.
	* testsuite/20_util/owner_less/noexcept.cc: New.
	* testsuite/20_util/shared_ptr/observers/owner_before.cc: Test
	noexcept guarantees.
	* testsuite/20_util/weak_ptr/observers/owner_before.cc: Likewise.

From-SVN: r248874
2017-06-05 10:33:19 +01:00
Andreas Schwab
d9850c48a9 baseline_symbols.txt: Update.
* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r248854
2017-06-03 09:56:43 +00:00
Eric Botcazou
76052545d2 configure.ac (*-*-linux-android*): Set target_makefile_frag.
* configure.ac (*-*-linux-android*): Set target_makefile_frag.
	* configure: Regenerate.
config/
	* mt-android: New file.
libstdc++-v3/
	* src/filesystem/dir.cc (fs::_Dir::advance): Use std::exchange.

From-SVN: r248853
2017-06-03 08:23:22 +00:00
Jonathan Wakely
4c19e432d6 PR libstdc++/80624 satisfy invariant for char_traits<char16_t>::eof()
PR libstdc++/80624
	* doc/xml/manual/status_cxx2011.xml: Document to_int_type behaviour.
	* include/bits/char_traits.h (char_traits<char16_t>::to_int_type):
	Transform eof value to U+FFFD.
	* testsuite/21_strings/char_traits/requirements/char16_t/eof.cc: New.
	* testsuite/27_io/basic_streambuf/sgetc/char16_t/80624.cc: New.
	* testsuite/27_io/basic_streambuf/sputc/char16_t/80624.cc: New.

From-SVN: r248843
2017-06-02 19:35:37 +01:00
Jonathan Wakely
ef3985dbd1 Remove libsupc++ makefile targets setting -std=gnu++11 or -std=gnu++14
* libsupc++/Makefile.am: Remove custom targets for files that need to
	be compiled as C++11 or C++14.
	* libsupc++/Makefile.in: Regenerate.
	* libsupc++/del_ops.cc: Use pragma to disable -Wsized-deallocation
	warnings.
	* libsupc++/del_opvs.cc: Likewise.

From-SVN: r248823
2017-06-02 12:49:04 +01:00
Richard Biener
1c26adb74d re PR libstdc++/80721 (Sorting/Merging of free EH-emergency buffer may wrong or uncomplete)
2017-06-02  Richard Biener  <rguenther@suse.de>
	Markus Eisenmann  <meisenmann.lba@fh-salzburg.ac.at>

	PR libstdc++/80721
	* libsupc++/eh_alloc.cc (pool::free): Keep list properly
	sorted and add missing freelist item merging cases.

Co-Authored-By: Markus Eisenmann <meisenmann.lba@fh-salzburg.ac.at>

From-SVN: r248816
2017-06-02 08:10:48 +00:00
Rainer Orth
e34fd4dc1c Fix cross compilation to Solaris
(GLIBCXX_CROSSCONFIG): Handle *-solaris* like *-linux* etc.
	Remove *-solaris* section.
	* configure: Regenerate.

From-SVN: r248791
2017-06-01 13:50:03 +00:00
Ville Voutilainen
e257141f07 re PR c++/80812 (ICE: in build_value_init_noctor, at cp/init.c:483)
PR c++/80812

cp/

PR c++/80812
* method.c (constructible_expr): Strip array types before calling
build_value_init.

libstdc++/

PR c++/80812
* testsuite/20_util/is_constructible/80812.cc: New.

From-SVN: r248788
2017-06-01 14:09:41 +03:00
Jonathan Wakely
046a84762b PR libstdc++/80893 Fix null dereference in vector<bool>
PR libstdc++/80893
	* include/bits/stl_bvector.h (vector<bool>::_M_initialize): Avoid
	null pointer dereference when size is zero.
	* testsuite/23_containers/vector/bool/80893.cc: New.
	* testsuite/util/testsuite_allocator.h (PointerBase::PointerBase):
	Add non-explicit constructor from nullptr.
	(PointerBase::derived() const): Add const-qualified overload.

From-SVN: r248734
2017-05-31 13:41:45 +01:00
Tim Shen
a8127c0cca re PR c++/80737 (variant<any> as class member resulting to compile errors)
PR libstdc++/80737
  * include/std/variant(variant::variant): SFINAE on is_same first.
  * testsuite/20_util/variant/any.cc: test case.

From-SVN: r248548
2017-05-28 21:27:30 +00:00
Jonathan Wakely
b678436176 Use CHAR_BIT instead of assuming 8 bits
* src/c++11/random.cc (random_device::_M_getentropy): Use __CHAR_BIT__
	instead of fixed number of bits.

From-SVN: r248428
2017-05-24 20:27:28 +01:00
Andreas Schwab
e1b6749586 baseline_symbols.txt: Update.
* config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Likewise.

From-SVN: r248420
2017-05-24 14:33:07 +00:00
Xi Ruoyao
78aa76df40 PR libstdc++/67578 Implement non-trivial std::random_device::entropy
2017-05-23  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
	    Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/67578
	* acinclude.m4: Bump libtool_VERSION.
	* config/abi/pre/gnu.ver: Create GLIBCXX_3.4.24 with new symbol.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Add test for <linux/random.h>.
	* doc/xml/manual/abi.xml: Document new library version.
	* include/bits/random.h (random_device::entropy)
	[_GLIBCXX_USE_RANDOM_TR1]: Add call to new _M_getentropy member.
	(random_device::_M_getentropy): Declare.
	* src/c++11/random.cc (random_device::_M_getentropy): Define.
	* testsuite/util/testsuite_abi.cc: Add GLIBCXX_3.4.24 to known
	versions, and make it the latest version.

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

From-SVN: r248374
2017-05-23 17:11:57 +01:00
Xi Ruoyao
5383998a58 PR libstdc++/67214 Avoid signed overflow in num_get::_M_extract_int
2017-05-23  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>

	PR libstdc++/67214
	* include/bits/locale_facets.tcc (num_get::_M_extract_int): Add
	explicit conversion to avoid signed overflow.

From-SVN: r248362
2017-05-23 11:16:08 +01:00
Jonathan Wakely
f710ca61ba PR libstdc++/80796 Add new std::search overload for C++17
PR libstdc++/80796
	* include/bits/stl_algo.h (search): Add new overload for C++17.
	* testsuite/25_algorithms/search/searcher.cc: New.

From-SVN: r248266
2017-05-19 13:11:31 +01:00
Jonathan Wakely
747217d179 PR libstdc++/80478 make std::mem_fn work with noexcept functions
PR libstdc++/80478
	* include/std/functional (_Mem_fn_traits_base): Add specializations
	for noexcept member function types.
	* testsuite/20_util/function_objects/mem_fn/80478.cc: New test.

From-SVN: r248245
2017-05-18 18:32:06 +01:00
Jonathan Wakely
8985968cc4 Fix typos in libstdc++ manual
* doc/xml/manual/policy_data_structures.xml: Fix typo.
	* doc/xml/manual/test_policy_data_structures.xml: Likewise.
	* doc/html/*: Regenerate.

From-SVN: r248189
2017-05-18 11:26:02 +01:00
Jonathan Wakely
8268fc6022 Update libstdc++ version info in manual
* doc/xml/manual/abi.xml: Document latest library versions.
	* doc/xml/manual/build_hacking.xml: Document requirement to update
	abi.xml when bumping library versions.
	* doc/html/*: Regenerate.

From-SVN: r248186
2017-05-18 11:09:32 +01:00
Jonathan Wakely
26bddba34a Fixes to Doxygen comments in libstdc++ headers
* include/bits/refwrap.h: Fix Doxygen warning.
	* include/bits/specfun.h: Likewise.
	* include/bits/std_function.h: Likewise.
	* include/bits/stl_algo.h (set_union, set_intersection)
	(set_difference, set_symmetric_difference): Add Doxygen @param tags
	for output iterator parameters.
	* include/bits/stl_iterator.h (inserter): Add Doxygen @param tag for
	iterator parameter.
	* include/std/mutex (try_lock, lock): Change Mutex to Lockable in
	Doxygen comments.

From-SVN: r248160
2017-05-17 17:02:33 +01:00
Ville Voutilainen
b42cc3ca24 Implement new C++ intrinsics __is_assignable and __is_constructible.
c-family/

Implement new C++ intrinsics __is_assignable and __is_constructible.
* c-common.c (__is_assignable, __is_constructible): New.
* c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.

cp/

PR c++/80654
PR c++/80682
Implement new C++ intrinsics __is_assignable and __is_constructible.
* cp-tree.h (CPTK_IS_ASSIGNABLE, CPTK_IS_CONSTRUCTIBLE): New.
(is_xible): New.
* cxx-pretty-print.c (pp_cxx_trait_expression): Handle
CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE.
* method.c (constructible_expr): Set cp_unevaluated.
(is_xible_helper): New.
(is_trivially_xible): Adjust.
(is_xible): New.
* parser.c (cp_parser_primary_expression): Handle
RID_IS_ASSIGNABLE and RID_IS_CONSTRUCTIBLE.
(cp_parser_trait_expr): Likewise.
* semantics.c (trait_expr_value): Handle
CPTK_IS_ASSIGNABLE and CPTK_IS_CONSTRUCTIBLE.

testsuite/

* g++.dg/ext/80654.C: New.

libstdc++-v3/

Implement new C++ intrinsics __is_assignable and __is_constructible.
* include/std/type_traits (__do_is_static_castable_impl): Remove.
(__is_static_castable_impl, __is_static_castable_safe): Likewise.
(__is_static_castable, __do_is_direct_constructible_impl): Likewise.
(__is_direct_constructible_impl): Likewise.
(__is_direct_constructible_new_safe): Likewise.
(__is_base_to_derived_ref, __is_lvalue_to_rvalue_ref): Likewise.
(__is_direct_constructible_ref_cast): Likewise.
(__is_direct_constructible_new, __is_direct_constructible): Likewise.
(__do_is_nary_constructible_impl): Likewise.
(__is_nary_constructible_impl, __is_nary_constructible): Likewise.
(__is_constructible_impl): Likewise.
(is_constructible): Call the intrinsic.
(__is_assignable_helper): Remove.
(is_assignable): Call the intrinsic.
(is_trivially_constructible): Likewise.
(__is_trivially_copy_constructible_impl): New.
(is_trivially_copy_constructible): Use it.
(__is_trivially_move_constructible_impl): New.
(is_trivially_move_constructible): Use it.
(is_trivially_assignable): Call the intrinsic.
(__is_trivially_copy_assignable_impl): New.
(is_trivially_copy_assignable): Use it.
(__is_trivially_move_assignable_impl): New.
(is_trivially_move_assignable): Use it.
(testsuite/20_util/declval/requirements/1_neg.cc): Adjust.
(testsuite/20_util/is_trivially_copy_assignable/value.cc):
Add test for void.
(testsuite/20_util/is_trivially_copy_constructible/value.cc): Likewise.
(testsuite/20_util/is_trivially_move_assignable/value.cc): Likewise.
(testsuite/20_util/is_trivially_move_constructible/value.cc): Likewise.
(testsuite/20_util/make_signed/requirements/typedefs_neg.cc): Adjust.
(testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc):
Likewise.

From-SVN: r248153
2017-05-17 16:54:23 +03:00
Jonathan Wakely
058c785479 Test source_location::current() in default member initializer
* testsuite/experimental/source_location/1.cc: Change expected result
	for source_location::current() used in default member initializer.

From-SVN: r248111
2017-05-16 15:26:14 +01:00
Jonathan Wakely
2673bae9d2 Implement std::experimental::source_location (N4519)
* configure: Regenerate.
	* doc/xml/manual/status_cxx2017.xml: Update status table.
	* doc/html/*: Regenerate.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/experimental/source_location: New header implementing N4519.
	* testsuite/experimental/source_location/1.cc: New test.

From-SVN: r248110
2017-05-16 14:37:52 +01:00
Jonathan Wakely
423624979a Fix forward declaration of std::type_info for versioned-namespace
PR libstdc++/80285
	* include/bits/shared_ptr_base.h [!__cpp_rtti] (type_info): Declare
	outside versioned namespace.

From-SVN: r248109
2017-05-16 14:16:34 +01:00