Commit Graph

9078 Commits

Author SHA1 Message Date
Bernd Edlinger
571512d5f5 Don't define guard macros when doing #include_next in math.h and stdlib.h
2016-02-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	PR libstdc++/69581
	* include/c_compatibility/math.h: Move header guards.
	* include/c_compatibility/stdlib.h: Likewise.

From-SVN: r233035
2016-02-01 11:13:40 +00:00
Jonathan Wakely
f597d5f73c Fix Cygwin bootstrap error due to TM symbols
PR libstdc++/69506
	* config/os/newlib/os_defines.h (_GLIBCXX_USE_WEAK_REF): Define.

From-SVN: r232974
2016-01-29 10:52:08 +00:00
John David Anglin
69b0daeb4a re PR libstdc++/69450 (libstdc++-v3/include/math.h:66:1 2: error: 'constexpr bool std::isnan(double)' conflicts with a previous declaration)
PR libstdc++/69450
	* acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): Split check for obsolete
	isinf and isnan functions into two independent checks.  Check on hpux.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* include/c_global/cmath (isinf(double), isnan(double)): Use
	_GLIBCXX_HAVE_OBSOLETE_ISINF and _GLIBCXX_HAVE_OBSOLETE_ISNAN,
	respectively.

From-SVN: r232925
2016-01-28 13:09:23 +00:00
Jakub Jelinek
8dc781e454 * testsuite/libstdc++-prettyprinters/whatis.cc: Include <random>.
From-SVN: r232898
2016-01-27 20:31:06 +01:00
Jonathan Wakely
bae87f7fdd Set FP options for failing special functions tests
PR libstdc++/69295
	* testsuite/ext/special_functions/hyperg/check_value.cc: Use
	-ffp-contract=off, and -ffloat-store to disable excess precision.
	* testsuite/special_functions/02_assoc_legendre/check_value.cc: Use
	-ffp-contract=off.

From-SVN: r232879
2016-01-27 15:09:38 +00:00
Jonathan Wakely
f1d591e8a6 Fix assertions for move assignment of trivial types
PR libstdc++/69478
	* include/bits/stl_algobase.h (__copy_move<_IsMove, true,
	random_access_iterator_tag>): Check is_move_assignable when moving.
	(__copy_move_backwards<_IsMove, true, random_access_iterator_tag>):
	Likewise.
	* testsuite/25_algorithms/copy/move_iterators/69478.cc: New.
	* testsuite/25_algorithms/copy_backward/move_iterators/69478.cc: New.
	* testsuite/25_algorithms/move/69478.cc: New.
	* testsuite/25_algorithms/move_backward/69478.cc: new.

From-SVN: r232842
2016-01-26 19:38:20 +00:00
Andris Pavenis
8964d2a090 Fix build failure when wide character support is not available
* include/c_compatibility/stdlib.h: Include wide character related
	definitions only when they are available in cstdlib.

From-SVN: r232835
2016-01-26 18:07:33 +02:00
Jonathan Wakely
2944621e2c Avoid including all of <random> in <algorithm>
PR libstdc++/69464
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/bits/random.h (uniform_int_distribution): Move to
	bits/uniform_int_dist.h.
	* include/bits/random.tcc (uniform_int_distribution::operator(),
	uniform_int_distribution::__generate_impl): Likewise.
	* include/bits/uniform_int_dist.h: New header.
	* include/bits/stl_algo.h [__cplusplus >= 201103L]: Include
	<bits/uniform_int_dist.h> instead of <random>.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy/
	move_iterators/1.cc: Include correct header for uninitialized_copy.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
	move_iterators/1.cc: Likewise.
	* testsuite/25_algorithms/nth_element/58800.cc: Include correct
	header for vector.
	* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lines.

From-SVN: r232798
2016-01-25 16:44:30 +00:00
John David Anglin
3676c0871f re PR libstdc++/69446 (cow-stdexcept.cc:374:1: error: alias d efinitions not supported in this configuration)
PR libstdc++/69446
	* config/os/hpux/os_defines.h (_GLIBCXX_USE_WEAK_REF): Define.

From-SVN: r232769
2016-01-23 22:24:59 +00:00
Edward Smith-Rowland
02dc241929 TR29124 C++ Special Math - <math.h> pulls funcs into global namespace.
2016-01-22  Edward Smith-Rowland  <3dw4rd@verizon.net>

	TR29124 C++ Special Math - <math.h> pulls funcs into global namespace.
	* include/c_compatibility/math.h: Import the TR29124 functions
	into the global namespace.
	* testsuite/special_functions/01_assoc_laguerre/compile_2.cc: Remove
	xfail and make compile-only.
	* testsuite/special_functions/02_assoc_legendre/compile_2.cc: Ditto.
	* testsuite/special_functions/03_beta/compile_2.cc: Ditto.
	* testsuite/special_functions/04_comp_ellint_1/compile_2.cc: Ditto.
	* testsuite/special_functions/05_comp_ellint_2/compile_2.cc: Ditto.
	* testsuite/special_functions/06_comp_ellint_3/compile_2.cc: Ditto.
	* testsuite/special_functions/07_cyl_bessel_i/compile_2.cc: Ditto.
	* testsuite/special_functions/08_cyl_bessel_j/compile_2.cc: Ditto.
	* testsuite/special_functions/09_cyl_bessel_k/compile_2.cc: Ditto.
	* testsuite/special_functions/10_cyl_neumann/compile_2.cc: Ditto.
	* testsuite/special_functions/11_ellint_1/compile_2.cc: Ditto.
	* testsuite/special_functions/12_ellint_2/compile_2.cc: Ditto.
	* testsuite/special_functions/13_ellint_3/compile_2.cc: Ditto.
	* testsuite/special_functions/14_expint/compile_2.cc: Ditto.
	* testsuite/special_functions/15_hermite/compile_2.cc: Ditto.
	* testsuite/special_functions/16_laguerre/compile_2.cc: Ditto.
	* testsuite/special_functions/17_legendre/compile_2.cc: Ditto.
	* testsuite/special_functions/18_riemann_zeta/compile_2.cc: Ditto.
	* testsuite/special_functions/19_sph_bessel/compile_2.cc: Ditto.
	* testsuite/special_functions/20_sph_legendre/compile_2.cc: Ditto.
	* testsuite/special_functions/21_sph_neumann/compile_2.cc: Ditto.

From-SVN: r232755
2016-01-22 23:17:10 +00:00
Jonathan Wakely
d1fb377c68 Constrain std::valarray functions and operators
PR libstdc++/69116
	* include/bits/valarray_before.h (__fun, __fun_with_valarray): Only
	define result_type for types which can be safely used with valarrays.
	* testsuite/26_numerics/valarray/69116.cc: New.

From-SVN: r232748
2016-01-22 21:15:41 +00:00
Jonathan Wakely
350fe2829e Allow _GLIBCXX_HAVE_OBSOLETE_ISINF_ISNAN to be overridden
PR libstdc++/69413
	* config/os/gnu-linux/os_defines.h: Define
	_GLIBCXX_NO_OBSOLETE_ISINF_ISNAN_DYNAMIC.
	* include/c_global/cmath (isinf, isnan): Check it.
	* doc/xml/manual/internals.xml: Document it.
	* doc/html/*: Regenerate.

From-SVN: r232726
2016-01-22 12:47:26 +00:00
Jonathan Wakely
ab56cbed60 libstdc++/69406 Fix test to check for supported headers
PR libstdc++/69406
	* include/bits/cpp_type_traits.h: Ensure C++ language linkage.
	* include/ext/type_traits.h: Likewise.
	* testsuite/17_intro/headers/c++2011/linkage.cc: Check autoconf macros
	for presence of C headers.
	* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Adjust
	dg-error line number.
	* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
	* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
	* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Likewise.

From-SVN: r232672
2016-01-21 13:33:27 +00:00
Torvald Riegel
7e10bcfa3c libstdc++: Darwin does not support weak refs without definition.
PR libstdc++/69310
        * config/os/bsd/darwin/os_defines.h (_GLIBCXX_USE_WEAK_REF): Define.

From-SVN: r232628
2016-01-20 17:47:03 +00:00
Jonathan Wakely
3f93466af4 Add C++11 <cmath> overloads to the global namespace
PR libstdc++/60401
	* include/c_compatibility/math.h (acosh, asinh, atanh, acbrt,
	copysign, erf, erfc, exp2, expm1, fdim, fma, fmax, fmin, hypot, ilogb,
	lgamma, llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
	nextafter, nexttoward, remainder, remquo, rint, round, scalbln, scalbn,
	tgamma, trunc) [__cplusplus >= 201103L && _GLIBCXX_USE_C99_MATH_TR1]:
	Add using declarations.
	* testsuite/26_numerics/headers/cmath/60401.cc: New.

From-SVN: r232627
2016-01-20 17:44:58 +00:00
Jonathan Wakely
eac437bf2c Ensure C++ language linkage in cmath and cstdlib
PR libstdc++/69386
	* include/c_global/ccomplex: Ensure C++ language linkage.
	* include/c_global/cmath: Likewise.
	* include/c_global/cstdlib: Likewise.
	* include/c_global/ctgmath: Likewise.
	* testsuite/17_intro/headers/c++2011/linkage.cc: New.

From-SVN: r232607
2016-01-20 12:34:25 +00:00
Jonathan Wakely
96e19adabc Add C++-conforming wrappers for stdlib.h and math.h
PR libstdc++/14608
	PR libstdc++/60401
	* include/Makefile.am: Use c_compatibility math.h and stdlib.h for
	--enable-cheaders=c_global configs.
	* include/Makefile.in: Regenerate.
	* include/c_compatibility/math.h: Remove obsolete _GLIBCXX_NAMESPACE_C
	test and allow inclusion from C files.
	* include/c_compatibility/stdlib.h: Likewise. Support freestanding.
	(at_quick_exit, quick_exit): Add using directives.
	* include/c_global/cmath: Use #include_next for math.h.
	* include/c_global/cstdlib: Use #include_next for stdlib.h.
	* testsuite/26_numerics/headers/cmath/14608.cc: New.
	* testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
	Remove xfail for most targets.
	* testsuite/26_numerics/headers/cstdlib/60401.cc: New.

From-SVN: r232586
2016-01-19 21:43:55 +00:00
Torvald Riegel
9585381acd libstdc++: Fix usage of __GXX_WEAK__ in TM TS support.
* include/bits/c++config (_GLIBCXX_USE_WEAK_REF): New.
	(_GLIBCXX_TXN_SAFE, _GLIBCXX_TXN_SAFE_DYN): Use	_GLIBCXX_USE_WEAK_REF
	and move after its definition.
	* config/os/aix/os_defines.h (_GLIBCXX_USE_WEAK_REF): Override.
	* src/c++11/cow-stdexcept.cc: Use _GLIBCXX_USE_WEAK_REF instead of
	__GXX_WEAK__, and only provide transactional clones if
	_GLIBCXX_USE_WEAK_REF is true.  Don't provide stubs of libitm
	functions.

From-SVN: r232539
2016-01-18 20:09:55 +00:00
Jonathan Wakely
c91bcffc4a Add test for PR 60637
PR libstdc++/60637
	* testsuite/26_numerics/headers/cmath/60637.cc: Add test.

From-SVN: r232534
2016-01-18 17:15:42 +00:00
Jonathan Wakely
d75d9f91e3 Fix PR number in changelog for commit r232504
From-SVN: r232507
2016-01-18 12:34:22 +00:00
Jonathan Wakely
9c5ad80efd Fix construction of std::function from null pointer-to-member
PR libstdc++/69293
	* include/std/functional (_Function_base::_M_not_empty_function):
	Change overloads for pointers to take arguments by value.
	* testsuite/20_util/function/cons/57465.cc: Add tests for
	pointer-to-member cases.

From-SVN: r232504
2016-01-18 11:43:37 +00:00
Jonathan Wakely
f5460595a4 Fix libstdc++ build with -fno-exceptions
PR libstdc++/69340
	* src/c++11/cow-stdexcept.cc (_txnal_cow_string_C1_for_exceptions):
	Use macros for exception handling and fix unused parameter warning.

From-SVN: r232502
2016-01-18 11:24:20 +00:00
John David Anglin
271366f679 re PR libstdc++/68734 (FAIL: libstdc++-abi/abi_check)
PR libstdc++/68734
	* config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r232486
2016-01-17 18:16:42 +00:00
Torvald Riegel
7a5d1d34ee libstdc++: Fix static_assert.
* src/c++11/cow-stdexcept.cc (txnal_read_ptr): Fix static_assert.

From-SVN: r232483
2016-01-17 17:43:37 +00:00
H.J. Lu
7573116b0a Revert the accidental checkin
From-SVN: r232476
2016-01-16 15:07:34 -08:00
H.J. Lu
5445d5bff0 Add __int128 symbols to x32 aseline_symbols.txt
* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Add
	__int128 symbols.

From-SVN: r232474
2016-01-16 14:52:21 -08:00
Jonathan Wakely
d7c1581c04 Use static assertion for uses-allocator construction
PR libstdc++/69293
	* include/bits/uses_allocator.h (__uses_alloc<true, ...>): Add
	static assertion that type is constructible from the arguments.
	* testsuite/20_util/scoped_allocator/69293_neg.cc: New.
	* testsuite/20_util/uses_allocator/69293_neg.cc: New.
	* testsuite/20_util/uses_allocator/cons_neg.cc: Adjust dg-error.

From-SVN: r232457
2016-01-15 23:12:13 +00:00
Jonathan Wakely
3d076231c6 PR libstdc++/69294 Check for isinf and isnan on AIX
PR libstdc++/69294
	* acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): Check for obsolete isinf
	and isnan on AIX. Quote variables.
	* configure: Regenerate.

From-SVN: r232455
2016-01-15 23:00:30 +00:00
Torvald Riegel
a04d5fc95d libstdc++: Make certain exceptions transaction_safe.
From-SVN: r232454
2016-01-15 22:42:41 +00:00
Steve Ellcey
cebeb718fe random.tcc: Use __builtin_isfinite instead of std::isfinite.
2016-01-15  Steve Ellcey  <sellcey@imgtec.com>

	* include/ext/random.tcc: Use __builtin_isfinite instead of
	std::isfinite.

From-SVN: r232452
2016-01-15 22:26:02 +00:00
Jonathan Wakely
3b07547d62 * include/bits/std_mutex.h: Fix Doxygen @file name.
From-SVN: r232416
2016-01-15 12:37:15 +00:00
Edward Smith-Rowland
2be75957b8 Implement TR29124 C++ special Math Functions.
2016-01-14  Edward Smith-Rowland  <3dw4rd@verizon.net>
	    Jonathan Wakely  <jwakely@redhat.com>
	    Florian Goth <CaptainSifff@gmx.de>

	Implement TR29124 C++ special Math Functions.
	* include/Makefile.am: Add new headers.
	* include/Makefile.in: Regenerate.
	* include/bits/specfun.h: New.
	* include/c_global/cmath: Adjust for both tr1 and tr29124 maths.
	* include/tr1/bessel_function.tcc: Ditto.
	* include/tr1/beta_function.tcc: Ditto.
	* include/tr1/cmath: Ditto.
	* include/tr1/ell_integral.tcc: Ditto.
	* include/tr1/exp_integral.tcc: Ditto.
	* include/tr1/gamma.tcc: Ditto.
	* include/tr1/hypergeometric.tcc: Ditto.
	* include/tr1/legendre_function.tcc: Ditto.
	* include/tr1/modified_bessel_func.tcc: Ditto.
	* include/tr1/poly_hermite.tcc: Ditto.
	* include/tr1/poly_laguerre.tcc: Ditto.
	* include/tr1/riemann_zeta.tcc: Ditto.
	* include/tr1/special_function_util.h: Ditto.
	* testsuite/ext/special_functions/conf_hyperg: New.
	* testsuite/ext/special_functions/conf_hyperg/check_nan.cc: New.
	* testsuite/ext/special_functions/conf_hyperg/check_value.cc: New.
	* testsuite/ext/special_functions/conf_hyperg/compile.cc: New.
	* testsuite/ext/special_functions/hyperg: New.
	* testsuite/ext/special_functions/hyperg/check_nan.cc: New.
	* testsuite/ext/special_functions/hyperg/check_value.cc: New.
	* testsuite/ext/special_functions/hyperg/compile.cc: New.
	* testsuite/libstdc++-dg/conformance.exp: Add special_functions directory.
	* testsuite/special_functions/01_assoc_laguerre/check_nan.cc: New.
	* testsuite/special_functions/01_assoc_laguerre/check_value.cc: New.
	* testsuite/special_functions/01_assoc_laguerre/compile.cc: New.
	* testsuite/special_functions/01_assoc_laguerre/compile_2.cc: New.
	* testsuite/special_functions/02_assoc_legendre/check_nan.cc: New.
	* testsuite/special_functions/02_assoc_legendre/check_value.cc: New.
	* testsuite/special_functions/02_assoc_legendre/compile.cc: New.
	* testsuite/special_functions/02_assoc_legendre/compile_2.cc: New.
	* testsuite/special_functions/03_beta/check_nan.cc: New.
	* testsuite/special_functions/03_beta/check_value.cc: New.
	* testsuite/special_functions/03_beta/compile.cc: New.
	* testsuite/special_functions/03_beta/compile_2.cc: New.
	* testsuite/special_functions/04_comp_ellint_1/check_nan.cc: New.
	* testsuite/special_functions/04_comp_ellint_1/check_value.cc: New.
	* testsuite/special_functions/04_comp_ellint_1/compile.cc: New.
	* testsuite/special_functions/04_comp_ellint_1/compile_2.cc: New.
	* testsuite/special_functions/05_comp_ellint_2/check_nan.cc: New.
	* testsuite/special_functions/05_comp_ellint_2/check_value.cc: New.
	* testsuite/special_functions/05_comp_ellint_2/compile.cc: New.
	* testsuite/special_functions/05_comp_ellint_2/compile_2.cc: New.
	* testsuite/special_functions/06_comp_ellint_3/check_nan.cc: New.
	* testsuite/special_functions/06_comp_ellint_3/check_value.cc: New.
	* testsuite/special_functions/06_comp_ellint_3/compile.cc: New.
	* testsuite/special_functions/06_comp_ellint_3/compile_2.cc: New.
	* testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: New.
	* testsuite/special_functions/07_cyl_bessel_i/check_value.cc: New.
	* testsuite/special_functions/07_cyl_bessel_i/compile.cc: New.
	* testsuite/special_functions/07_cyl_bessel_i/compile_2.cc: New.
	* testsuite/special_functions/07_cyl_bessel_i/pr56216.cc: New.
	* testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: New.
	* testsuite/special_functions/08_cyl_bessel_j/check_value.cc: New.
	* testsuite/special_functions/08_cyl_bessel_j/compile.cc: New.
	* testsuite/special_functions/08_cyl_bessel_j/compile_2.cc: New.
	* testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: New.
	* testsuite/special_functions/09_cyl_bessel_k/check_value.cc: New.
	* testsuite/special_functions/09_cyl_bessel_k/compile.cc: New.
	* testsuite/special_functions/09_cyl_bessel_k/compile_2.cc: New.
	* testsuite/special_functions/10_cyl_neumann/check_nan.cc: New.
	* testsuite/special_functions/10_cyl_neumann/check_value.cc: New.
	* testsuite/special_functions/10_cyl_neumann/compile.cc: New.
	* testsuite/special_functions/10_cyl_neumann/compile_2.cc: New.
	* testsuite/special_functions/11_ellint_1/check_nan.cc: New.
	* testsuite/special_functions/11_ellint_1/check_value.cc: New.
	* testsuite/special_functions/11_ellint_1/compile.cc: New.
	* testsuite/special_functions/11_ellint_1/compile_2.cc: New.
	* testsuite/special_functions/12_ellint_2/check_nan.cc: New.
	* testsuite/special_functions/12_ellint_2/check_value.cc: New.
	* testsuite/special_functions/12_ellint_2/compile.cc: New.
	* testsuite/special_functions/12_ellint_2/compile_2.cc: New.
	* testsuite/special_functions/13_ellint_3/check_nan.cc: New.
	* testsuite/special_functions/13_ellint_3/check_value.cc: New.
	* testsuite/special_functions/13_ellint_3/compile.cc: New.
	* testsuite/special_functions/13_ellint_3/compile_2.cc: New.
	* testsuite/special_functions/14_expint/check_nan.cc: New.
	* testsuite/special_functions/14_expint/check_value.cc: New.
	* testsuite/special_functions/14_expint/compile.cc: New.
	* testsuite/special_functions/14_expint/compile_2.cc: New.
	* testsuite/special_functions/15_hermite/check_nan.cc: New.
	* testsuite/special_functions/15_hermite/check_value.cc: New.
	* testsuite/special_functions/15_hermite/compile.cc: New.
	* testsuite/special_functions/15_hermite/compile_2.cc: New.
	* testsuite/special_functions/16_laguerre/check_nan.cc: New.
	* testsuite/special_functions/16_laguerre/check_value.cc: New.
	* testsuite/special_functions/16_laguerre/compile.cc: New.
	* testsuite/special_functions/16_laguerre/compile_2.cc: New.
	* testsuite/special_functions/17_legendre/check_nan.cc: New.
	* testsuite/special_functions/17_legendre/check_value.cc: New.
	* testsuite/special_functions/17_legendre/compile.cc: New.
	* testsuite/special_functions/17_legendre/compile_2.cc: New.
	* testsuite/special_functions/18_riemann_zeta/check_nan.cc: New.
	* testsuite/special_functions/18_riemann_zeta/check_value.cc: New.
	* testsuite/special_functions/18_riemann_zeta/compile.cc: New.
	* testsuite/special_functions/18_riemann_zeta/compile_2.cc: New.
	* testsuite/special_functions/19_sph_bessel/check_nan.cc: New.
	* testsuite/special_functions/19_sph_bessel/check_value.cc: New.
	* testsuite/special_functions/19_sph_bessel/compile.cc: New.
	* testsuite/special_functions/19_sph_bessel/compile_2.cc: New.
	* testsuite/special_functions/20_sph_legendre/check_nan.cc: New.
	* testsuite/special_functions/20_sph_legendre/check_value.cc: New.
	* testsuite/special_functions/20_sph_legendre/compile.cc: New.
	* testsuite/special_functions/20_sph_legendre/compile_2.cc: New.
	* testsuite/special_functions/21_sph_neumann/check_nan.cc: New.
	* testsuite/special_functions/21_sph_neumann/check_value.cc: New.
	* testsuite/special_functions/21_sph_neumann/compile.cc: New.
	* testsuite/special_functions/21_sph_neumann/compile_2.cc: New.
	* testsuite/util/specfun_testcase.h: New.
	* testsuite/tr1/5_numerical_facilities/special_functions/08_cyl_bessel_i/check_value.cc: More testcases.
	* testsuite/tr1/5_numerical_facilities/special_functions/09_cyl_bessel_j/check_value.cc: Ditto.
	* testsuite/tr1/5_numerical_facilities/special_functions/10_cyl_bessel_k/check_value.cc: Ditto.
	* testsuite/tr1/5_numerical_facilities/special_functions/11_cyl_neumann/check_value.cc: Ditto.
	* testsuite/tr1/5_numerical_facilities/special_functions/21_sph_bessel/check_value.cc: Ditto.
	* testsuite/tr1/5_numerical_facilities/special_functions/23_sph_neumann/check_value.cc: Ditto.
	* testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/check_value.cc: New.


Co-Authored-By: Florian Goth <CaptainSifff@gmx.de>
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>

From-SVN: r232377
2016-01-14 18:12:43 +00:00
Jonathan Wakely
39a1d8c894 Use ::isinf and ::isnan if libc defines them
PR libstdc++/48891
	* acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): Check for obsolete isinf
	and isnan functions.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* include/c_global/cmath (isinf(double), isnan(double))
	[_GLIBCXX_HAVE_OBSOLETE_ISINF_ISNAN]: Import via using-directive.
	* testsuite/26_numerics/headers/cmath/48891.cc: New.

From-SVN: r232327
2016-01-13 16:25:56 +00:00
Rainer Orth
e862906c25 Introduce separate baselines for Solaris 10 and 11+ (PR libstdc++/66006)
PR libstdc++/66006
	* configure.host (abi_baseline_pair): Use separate baseline for
	Solaris 11+ and Solaris 10 with gld.
	* config/abi/post/solaris2.11/amd64/baseline_symbols.txt: New file.
	* config/abi/post/solaris2.11/baseline_symbols.txt: New file.
	* config/abi/post/solaris2.11/sparcv9/baseline_symbols.txt: New file.

From-SVN: r232317
2016-01-13 09:48:53 +00:00
Daniel Kruegler
26b5ace7ea libstdc++/68877 Reimplement std::__is_swappable
2016-01-12  Daniel Kruegler  <daniel.kruegler@gmail.com>

	PR libstdc++/68877
	* include/std/type_traits: Following N4511, reimplement __is_swappable
	and __is_nothrow_swappable. Move __is_swappable to namespace std,
	adjust callers. Use __is_nothrow_swappable in swap.
	* include/bits/move.h: Use __is_nothrow_swappable in swap.
	* testsuite/20_util/is_nothrow_swappable/value.cc: Extend; remove
	__is_swappable related tests.
	* testsuite/20_util/is_swappable/value.cc: New.
	* testsuite/20_util/is_swappable/requirements/
	explicit_instantiation.cc: New.
	* testsuite/20_util/is_swappable/requirements/typedefs.cc: New.
	* testsuite/25_algorithms/swap/68877.cc: New.

From-SVN: r232296
2016-01-12 21:19:58 +00:00
Jonathan Wakely
bd285a8bdb Extend std::function test for PR 68995
* testsuite/20_util/function/68995.cc: Test reference_wrapper cases.

From-SVN: r232294
2016-01-12 19:39:47 +00:00
Jonathan Wakely
1c3c7c4145 Prevent recursive instantiation in std::function
PR libstdc++/69005
	PR libstdc++/69222
	* include/std/functional (function::_Invoke): Remove, use result_of.
	(function::_Callable): Replace alias template with class template
	and use partial specialization instead of _NotSelf alias template.
	(function(_Functor)): Add "not self" constraint so that _Callable is
	not used while type is incomplete.
	* testsuite/20_util/function/69222.cc: New.

From-SVN: r232273
2016-01-12 14:54:33 +00:00
Jonathan Wakely
1517bc3008 allocator_traits<allocator<T>> partial specialization
PR libstdc++/60976
	* include/bits/alloc_traits.h (allocator_traits<allocator<_Tp>>):
	Define partial specialization.
	* testsuite/20_util/shared_ptr/cons/58659.cc: Add construct and
	destroy members to std::allocator explicit specialization.

From-SVN: r232232
2016-01-11 16:47:58 +00:00
Jonathan Wakely
8babc12b22 Use -std option in test for C99 macros in <cmath>
* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++.cc: Rename to ...
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++98.cc: Here and add -std=gnu++98.
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++0x.cc: Rename to ...
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++11.cc: Here.

From-SVN: r232165
2016-01-08 14:59:36 +00:00
Jonathan Wakely
32a8c97f5c Fix PR number in previous commit
From-SVN: r232163
2016-01-08 13:19:25 +00:00
Jonathan Wakely
e525d78caa Add missing include for std::__addressof
PR libstdc++/69160
	* include/bits/uses_allocator.h: Add missing include.

From-SVN: r232162
2016-01-08 13:14:01 +00:00
Jonathan Wakely
f885fa898f Use std::addressof in insert iterators, allocators and promises
PR libstdc++/69105
	PR libstdc++/69106
	PR libstdc++/69114
	* include/bits/stl_iterator.h (back_insert_iterator,
	front_insert_iterator, insert_iterator): Use __addressof (LWG 2324).
	* include/bits/uses_allocator.h (__use_alloc): Use __addressof.
	* include/std/future (__future::base::_State_baseV2::__setter):
	Likewise.
	* include/std/scoped_allocator (__outermost): Likewise.
	* testsuite/20_util/scoped_allocator/69114.cc: New.
	* testsuite/20_util/uses_allocator/69114.cc: New.
	* testsuite/30_threads/promise/69106.cc: New.

From-SVN: r232129
2016-01-07 15:01:33 +00:00
Jonathan Wakely
373a75fb2a Remove noexcept from function template that can throw
PR libstdc++/69092
	* include/bits/basic_string.h (basic_string::_S_copy_chars<_Iterator>):
	Remove _GLIBCXX_NOEXCEPT.
	testsuite/21_strings/basic_string/cons/char/69092.cc: New.

From-SVN: r232112
2016-01-06 20:34:41 +00:00
Jonathan Wakely
0c3e5dd1e6 Rename bits/mutex.h to avoid clashing with glibc
* include/Makefile.am: Adjust.
	* include/Makefile.in: Regenerate.
	* include/bits/mutex.h: Rename to bits/std_mutex.h.
	* include/std/condition_variable: Adjust include.
	* include/std/mutex: Likewise.

From-SVN: r232101
2016-01-06 13:00:33 +00:00
Jakub Jelinek
818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Edward Smith-Rowland
9be77061cf 2015-12-27 Edward Smith-Rowland <3dw4rd@verizon.net>
* include/bits/c++0x_warning.h Remove experimental language.

From-SVN: r231966
2015-12-28 00:07:19 +00:00
Jason Merrill
b4a0c79b1a Correct use of __GXX_WEAK__ macro.
* testsuite/ext/bitmap_allocator/check_deallocate_null.cc
	* testsuite/ext/bitmap_allocator/check_allocate_max_size.cc

From-SVN: r231953
2015-12-24 22:25:09 -05:00
Jonathan Wakely
9643ce888b Add inline to std::__invfwd
PR libstdc++/59768
	* include/std/functional (__invfwd): Add inline specifier.

From-SVN: r231900
2015-12-22 11:37:07 +00:00
Jonathan Wakely
989d4a8609 Rename test file that had incorrect bug number
PR libstdc++/68982
	testsuite/20_util/function_objects/mem_fn/68276.cc: Rename to ...
	testsuite/20_util/function_objects/mem_fn/68982.cc: Correct bug number.

From-SVN: r231881
2015-12-21 14:16:36 +00:00
Jonathan Wakely
a716d11ad4 libstdc++/68995 qualify calls to __callable_functor
PR libstdc++/68995
	* include/std/functional (_function_handler, function): Qualify
	__callable_functor.
	* testsuite/20_util/function/68995.cc: New.

From-SVN: r231880
2015-12-21 13:02:18 +00:00