Commit Graph

9101 Commits

Author SHA1 Message Date
Jonathan Wakely 6da8b93163 * testsuite/30_threads/thread/70503.cc: Adjust from xfail to pass.
From-SVN: r234808
2016-04-07 15:26:24 +01:00
Eric Botcazou 49a52ebcc0 Makefile.am (libstdc++-symbols.ver): Remove useless /dev/null.
* src/Makefile.am (libstdc++-symbols.ver): Remove useless /dev/null.
	* src/Makefile.in: Regenerate.

From-SVN: r234782
2016-04-06 15:07:49 +00:00
Jonathan Wakely d2aee115cc Restore atomic builtins usage in libstdc++-v3
PR libstdc++/70554
	* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Don't test
	__atomic_fetch_add for bool.
	* configure: Regenerate.

From-SVN: r234761
2016-04-05 20:03:46 +01:00
Jonathan Wakely d5ec69f374 * testsuite/30_threads/thread/70503.cc: Require -static to work.
From-SVN: r234757
2016-04-05 18:21:48 +01:00
Jonathan Wakely 87cec93ee0 Ensure std::thread helpers have internal linkage
PR libstdc++/70503
	* src/c++11/thread.cc (execute_native_thread_routine,
	execute_native_thread_routine_compat): Give internal linkage.
	* testsuite/30_threads/thread/70503.cc: New test.

From-SVN: r234746
2016-04-05 14:35:32 +01:00
Ville Voutilainen 7b3318c41e re PR libstdc++/70437 (Instantiation loop with pair and is_constructible)
PR libstdc++/70437
 	* include/bits/stl_pair.h (_ConstructiblePair,
	_ImplicitlyConvertiblePair, _MoveConstructiblePair,
	_ImplicitlyMoveConvertiblePair): Add shortcut conditions
	for same-type cases.
	* testsuite/20_util/pair/70437.cc: New.

From-SVN: r234743
2016-04-05 14:31:30 +03:00
Jonathan Wakely 00e6c25ac8 libstdc++/69945 Add __gnu_cxx::__freeres hook
PR libstdc++/69945
	* config/abi/pre/gnu.ver: Add new symbol.
	* libsupc++/eh_alloc.cc (__gnu_cxx::__freeres): Define.
	* testsuite/18_support/free_eh_pool.cc: New test.

From-SVN: r234465
2016-03-24 18:13:40 +00:00
Bernd Edlinger bfd84e6ba5 Makefile.am (install-freestanding-headers): Add concept_check.h and move.h to the installed headers.
2016-03-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * include/Makefile.am (install-freestanding-headers): Add
        concept_check.h and move.h to the installed headers.
        * include/Makefile.in: Regenerated.
        * include/bits/concept_check.h: Ignore _GLIBCXX_CONCEPT_CHECKS for
        freestanding implementations.
        * doc/xml/manual/using.xml (_GLIBCXX_CONCEPT_CHECKS): Mention
        that this macro has no effect for freestanding implementations.
        * doc/html/manual/using_macros.html: Likewise.

From-SVN: r234414
2016-03-23 00:41:52 +00:00
Uros Bizjak f2f48c6c60 * libsupc++/guard.cc: Revert my last commit.
From-SVN: r234336
2016-03-18 16:44:44 +01:00
Uros Bizjak 09d8f35943 Revert:
2015-07-02  Uros Bizjak  <ubizjak@gmail.com>

	* libsupc++/guard.cc (__test_and_acquire): Use __p after __atomic_load
	to avoid unused variable warning.
	(__set_and_release): Use __p after __atomic_store to avoid unused
	variable warning.

From-SVN: r234331
2016-03-18 16:28:54 +01:00
Jonathan Wakely 86715b0917 libstdc++/69939 Qualify get and forward
PR libstdc++/69939
	* include/experimental/tuple (__apply_impl): Qualify get and forward.

From-SVN: r233666
2016-02-24 13:59:29 +00:00
Jonathan Wakely be9967e877 Document __STDCPP_WANT_MATH_SPEC_FUNCS__ macro
* doc/xml/manual/using.xml: Document __STDCPP_WANT_MATH_SPEC_FUNCS__.
	* doc/html/*: Regenerate.

From-SVN: r233645
2016-02-23 20:03:30 +00:00
Jonathan Wakely 9aee022eb9 libstdc++/69893 make <tr1/cmath> work with C++11
PR libstdc++/69893
	* include/tr1/cmath (acosh, asinh, atanh, cbrt, copysign, erf, erfc,
	exp2, expm1, fdim, fma, fmax, fmin, hypot, ilogb, lgamma, llrint,
	llround, log1p, log2, logb, lrint, lround, nan, nearbyint, nextafter,
	nexttoward, remainder, remquo, rint, round, scalbln, scalbn, tgamma,
	trunc) [__cplusplus >= 201103L]: Import from namespace std.
	(fabs) [__cplusplus < 201103L]: Import from namespace std.
	* include/tr1/complex (acosh, asinh, atanh) [__cplusplus >= 201103L]:
	Likewise.
	* testsuite/tr1/headers/c++200x/complex.cc: Add std::fabs to global
	namespace before including TR1 headers.
	* testsuite/tr1/headers/c++200x/math.cc: New test.

From-SVN: r233644
2016-02-23 19:49:31 +00:00
Bernd Edlinger 5f6dd5930f re PR libstdc++/69881 (with gcc-6 of today building gcc-4.9 fails)
2016-02-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR libstdc++/69881
        * include/c_global/cstdarg: Undefine __need___va_list.
        * include/c_global/cstddef: Undefine all kinds of __need_*.

From-SVN: r233636
2016-02-23 15:57:09 +00:00
Tim Shen 244901a572 re PR libstdc++/69794 (std::regex_search match failure with regex object with flags grep|icase)
2016-02-16  Tim Shen  <timshen@google.com>

	PR libstdc++/69794
	* include/bits/regex_scanner.h: Add different special character
	sets for grep and egrep regex.
	* include/bits/regex_scanner.tcc: Use _M_spec_char more uniformly.
	* testsuite/28_regex/regression.cc: Add new testcase.

From-SVN: r233482
2016-02-17 03:33:02 +00:00
Mike Stump 82f0f78917 Fix FAIL: special_functions/18_riemann_zeta/check_value.cc (test for excess errors)
From-SVN: r233391
2016-02-12 21:23:11 +00:00
Mike Stump af583c4457 Ensure stdout is newline terminated for status wrappers.
From-SVN: r233254
2016-02-09 20:18:10 +00:00
Jonathan Wakely 2158532f31 Remove accidentally added 'constexpr' in previous commit
* acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): Remove accidentally
	added 'constexpr' in previous commit.
	* configure: Regenerate.

From-SVN: r233219
2016-02-08 15:37:59 +00:00
Jonathan Wakely cc07da33ae Enable isinf/isnan checks for all targets
PR libstdc++/48891
	* acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): Enable isinf and isnan
	checks for all targets except *-*-solaris2.* and ensure we find the
	libc math.h header not our own.
	* configure: Regenerate.

From-SVN: r233214
2016-02-08 15:22:32 +00:00
Dominik Vogt acc046464c libstdc++: S/390: Add missing baseline_symbols.txt for s390x/-m31.
The attached patch copies the existing 
libstdc++-v3/config/abi/post/s390-linux-gnu/baseline_symbols.txt
to .../s390x-linux-gnu/32/baseline_symbols.txt.  This fixes the
abi test failure on s390x with -m31.

libstdc++-v3/ChangeLog

	* config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt (FUNC):
	New file.  Copied over from s390-linux-gnu.

From-SVN: r233170
2016-02-05 10:25:08 +00:00
Jonathan Wakely 3555173fb9 Test for C99 stdlib.h functions with -std=c++98
PR libstdc++/69626
	* acinclude.m4 (GLIBCXX_ENABLE_C99): Check C99 stdlib.h functions
	with -std=c++98 and define _GLIBCXX98_USE_C99_STDLIB.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* testsuite/21_strings/c_strings/char/69626.cc: New.

From-SVN: r233161
2016-02-04 23:47:21 +00:00
Jonathan Wakely 15ebf37974 Regenerate front page of libstdc++ HTML docs
* doc/html/index.html: Regenerate.

From-SVN: r233151
2016-02-04 21:46:19 +00:00
Jonathan Wakely dbcda3ee8e Update copyright years in libstdc++ manual and add link
* doc/xml/manual/containers.xml: Add cross-reference to Dual ABI.
	* doc/xml/manual/spine.xml: Update copyright years and author blurb.
	* doc/html/*: Regenerate.

From-SVN: r233150
2016-02-04 21:43:40 +00:00
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