Commit Graph

7148 Commits

Author SHA1 Message Date
Jonathan Wakely cd80c79ce7 test.xml: Improve documentation on running a subset of tests.
* doc/xml/manual/test.xml: Improve documentation on running a subset
	of tests.
	* doc/html/manual/test.html: Regenerate.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

From-SVN: r221330
2015-03-10 18:41:46 +00:00
Jonathan Wakely d2e0c00b8c re PR libstdc++/64467 (28_regex/traits/char/isctype.cc and wchar_t/isctype.cc)
PR libstdc++/64467
	* testsuite/28_regex/traits/char/isctype.cc: Don't test newline
	for newlib targets. Really fix mixed line-endings this time.

From-SVN: r221279
2015-03-09 12:47:51 +00:00
Jonathan Wakely 664e99eac4 future (future_error(error_code)): Construct base class with error_code's message.
* include/std/future (future_error(error_code)): Construct base
	class with error_code's message.
	* src/c++11/future.cc (future_error::what()): Do not call c_str() on
	temporary string.

From-SVN: r221236
2015-03-06 12:31:43 +00:00
Jonathan Wakely 9933260f2f locale_conv.h (wstring_convert::_M_conv): Handle noconv result.
* include/bits/locale_conv.h (wstring_convert::_M_conv): Handle
	noconv result.
	* testsuite/22_locale/conversions/string/2.cc: Also test UTF-8.
	* testsuite/22_locale/conversions/string/3.cc: Likewise, and UTF-16.

From-SVN: r221212
2015-03-05 13:36:21 +00:00
Jonathan Wakely b6584a72ac re PR libstdc++/64797 (22_locale/conversions/string/2.cc FAILs)
PR libstdc++/64797
	* include/bits/locale_conv.h (wstring_convert::_M_conv): Handle
	incomplete multibyte sequences correctly.
	* include/std/codecvt (codecvt_utf8, codecvt_utf16,
	codecvt_utf8_utf16): Limit _Maxcode to maximum Unicode code point.
	* src/c++11/codecvt.cc (invalid_mb_sequence, incomplete_mb_character):
	Define constants.
	(is_high_surrogate, is_low_surrogate, surrogate_pair_to_code_point):
	Define convenience functions.
	(read_utf8_code_point): Return relevant constant to distinguish
	incomplete characters from invalid sequences.
	(read_utf16_code_point): Likewise. Check for invalid sequences.
	(ucs4_in, utf16_in): Use incomplete_mb_character constant.
	(utf16_out): Check for invalid sequences.
	(utf16_span): Fix condition.
	(ucs2_out): Use is_high_surrogate.
	(ucs2_in): Use incomplete_mb_character constant and fix condition.
	* testsuite/22_locale/codecvt/char16_t.cc: Fix whitespace.
	* testsuite/22_locale/conversions/buffer/1.cc: New.
	* testsuite/22_locale/conversions/string/2.cc: Use char16_t and
	char32_t instead of wchar_t.
	* testsuite/22_locale/conversions/string/3.cc: New.

From-SVN: r221189
2015-03-04 17:19:55 +00:00
Iain Sandoe 71ca36ba7b re PR libstdc++/64883 (FAIL: 17_intro/headers/c++*/all_attributes.cc (test for excess errors) on x86_64-apple-darwin10)
2015-03-03  Iain Sandoe  <iain@codesourcery.com>

	PR libstdc++/64883
	* testsuite/17_intro/headers/c++1998/all_attributes.cc: Don't check
	visibility for Darwin.
	* testsuite/17_intro/headers/c++200x/all_attributes.cc: Likewise, and
	also deprecated.
	* testsuite/17_intro/headers/c++2014/all_attributes.cc: Likewise.

From-SVN: r221160
2015-03-03 18:14:20 +00:00
Jonathan Wakely 9d8dbe732a re PR libstdc++/65279 (std::scoped_allocator_adaptor is not assignable)
PR libstdc++/65279
	* include/std/scoped_allocator (__inner_type_impl,
	scoped_allocator_adaptor): Add defaulted copy assignment and move
	assignment operators.
	* testsuite/20_util/scoped_allocator/65279.cc: New.

From-SVN: r221119
2015-03-02 17:50:55 +00:00
Jonathan Wakely e59a2e945e re PR libstdc++/64367 (g++-v5/stdexcept:52:28: error: invalid use of non-static data member '_M_p')
PR libstdc++/64367
	* include/std/stdexcept (__sso_string): Don't use non-static member
	in sizeof.

From-SVN: r221118
2015-03-02 16:50:24 +00:00
Matthias Klose f083b434c2 re PR libstdc++/65246 (libstdc++ pretty printers don't work anymore with Python3)
2015-02-28  Matthias Klose  <doko@ubuntu.com>

        PR libstdc++/65246
        * python/libstdcxx/v6/__init__.py: Use explicit relative imports.

From-SVN: r221076
2015-02-28 09:22:43 +00:00
Jonathan Wakely 1d5f1ff217 status_cxx2011.xml: Remove duplicated information.
* doc/xml/manual/status_cxx2011.xml: Remove duplicated information.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r220894
2015-02-22 13:20:32 +00:00
Jonathan Wakely b56ac9d5f4 status_cxx2011.xml: Document implementation-defined behavior.
* doc/xml/manual/status_cxx2011.xml: Document implementation-defined
	behavior.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r220878
2015-02-20 19:01:46 +00:00
Jonathan Wakely deaa1ccbec re PR libstdc++/64695 (FAIL: libstdc++-prettyprinters/cxx11.cc)
PR libstdc++/64695
	* python/libstdcxx/v6/printers.py (StdTuplePrinter): Handle new
	tuple layout.

From-SVN: r220871
2015-02-20 14:40:00 +00:00
Jonathan Wakely 87839f22d2 re PR libstdc++/58357 (In C++11 std::rotate(first, middle, last) now should return a forward iterator to first + (last - middle).)
PR libstdc++/58357
	* include/bits/algorithmfwd.h (rotate): Move to inline namespace _V2.
	* include/bits/stl_algo.h (__rotate, rotate): Likewise.

From-SVN: r220823
2015-02-19 20:57:40 +00:00
Hans-Peter Nilsson 53b2288f93 re PR testsuite/65093 (26_numerics/random/binomial_distribution/operators/values.cc times out on slow targets)
PR testsuite/65093
	* testsuite/26_numerics/random/binomial_distribution/operators/values.cc
	(test01): Add explanatory comment.  Keep only the bd1 sub-test and
	split out bd2, bd3, bd4, and bd5 sub-tests into...
	* testsuite/26_numerics/random/binomial_distribution/operators/values2.cc,
	testsuite/26_numerics/random/binomial_distribution/operators/values3.cc,
	testsuite/26_numerics/random/binomial_distribution/operators/values4.cc,
	testsuite/26_numerics/random/binomial_distribution/operators/values5.cc:
	New separate files with the old parts.

From-SVN: r220821
2015-02-19 19:30:03 +00:00
Jonathan Wakely 01bf6bdb10 char16_t.cc: Add dg-require-cstdint.
* testsuite/22_locale/codecvt/char16_t.cc: Add dg-require-cstdint.
	* testsuite/22_locale/codecvt/char32_t.cc: Likewise.

From-SVN: r220795
2015-02-18 20:21:04 +00:00
Jonathan Wakely 7f971f18e4 codecvt.cc (write_utf16_code_point): Fix code to output surrogate pairs.
* src/c++11/codecvt.cc (write_utf16_code_point): Fix code to output
	surrogate pairs.
	(utf16_in): Pass mode argument to write_utf16_code_point.
	(codecvt<char16_t, char, mbstate_t>::do_in): Set mode according to
	native byte order.
	* testsuite/22_locale/codecvt/char16_t.cc: New.
	* testsuite/22_locale/codecvt/in/wchar_t/1.cc: Fix typo.

From-SVN: r220793
2015-02-18 19:39:03 +00:00
Rüdiger Sonderfeld fb96818737 char32_t.cc: New.
2015-02-17  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
	    Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/22_locale/codecvt/char32_t.cc: New.

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

From-SVN: r220760
2015-02-17 14:25:48 +00:00
Jonathan Wakely faa7d78e41 re PR libstdc++/65085 (Move-assigned empty string corrupt with -D_GLIBCXX_USE_CXX11_ABI=1)
PR libstdc++/65085
	* include/bits/basic_string.h (basic_string(basic_string&&)): Ensure
	empty string gets null-terminated.
	* testsuite/21_strings/basic_string/cons/char/65085.cc: New.

From-SVN: r220758
2015-02-17 12:44:26 +00:00
Matthew Wahab 1e0c223f94 isctype.cc (test01): Fix mixed line-endings introduced in last change.
* testsuite/28_regex/traits/char/isctype.cc (test01): Fix
	mixed line-endings introduced in last change.

From-SVN: r220682
2015-02-13 13:42:06 +00:00
Matthew Wahab 72900b8306 isctype.cc (test01): Replace test for __NEWLIB__ macro with a dejagnu set macro.
* testsuite/28_regex/traits/char/isctype.cc (test01): Replace test
	for __NEWLIB__ macro with a dejagnu set macro.
	* testsuite/28_regex/traits/wchar_t/isctype.cc (test01): Likewise.

From-SVN: r220648
2015-02-12 14:55:23 +00:00
Matthew Wahab ff9eac2965 [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
libstdc++-v3/
2015-02-02  Matthew Wahab  <matthew.wahab@arm.com>

	PR libstdc++/64467
	* testsuite/28_regex/testsuiteraits/char/isctype.cc (test01): Add newlib
	special case for '\n'.
	* test01estsuite/28_regex/traits/wchar_t/isctype.cc (test01): Likewise.

From-SVN: r220392
2015-02-04 09:24:56 +00:00
Jonathan Wakely 516db2dd07 * src/c++11/futex.cc: Do not define for gthr-single.h targets.
From-SVN: r220319
2015-02-01 15:11:23 +00:00
Jonathan Wakely 13fc08e44e re PR libstdc++/64883 (FAIL: 17_intro/headers/c++*/all_attributes.cc (test for excess errors) on x86_64-apple-darwin10)
PR libstdc++/64883
	* include/c_global/cstdio (gets): Use __deprecated__ attribute instead
	of deprecated.
	* include/c_std/cstdio (gets): Likewise.
	* testsuite/17_intro/headers/c++1998/all_attributes.cc: Avoid clashing
	with attributes used in darwin headers.

From-SVN: r220318
2015-02-01 15:11:08 +00:00
Jakub Jelinek 536616b775 acinclude.m4 (VTV_CYGMIN): Use x$vtv_cygmin = xyes instead of $vtv_cygmin = yes.
* acinclude.m4 (VTV_CYGMIN): Use x$vtv_cygmin = xyes instead of
	$vtv_cygmin = yes.  Initialize vtv_cygmin=no unconditionally first.
	* configure: Regenerated.

From-SVN: r220259
2015-01-29 19:36:03 +01:00
H.J. Lu f4392940cd Define VTV_CYGMIN after vtv_cygmin is set
* acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY): Define VTV_CYGMIN
	after vtv_cygmin is set.
	* configure: Regenerated.

From-SVN: r220258
2015-01-29 10:21:33 -08:00
Matthias Klose 23842e9135 acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY): Define VTV_CYGMIN unconditionally.
2015-01-29  Matthias Klose  <doko@ubuntu.com>

        * acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY): Define VTV_CYGMIN
        unconditionally.
        * configure: Regenerate.

From-SVN: r220257
2015-01-29 18:12:29 +00:00
Caroline Tice 8be349eea9 Committing generated configure & Makefile.in pieces of VTV Cygwin patch (from Patrick Wollgast).
Committing generated configure & Makefile.in pieces of
VTV Cygwin patch (from Patrick Wollgast).  Forgot to 
commit these with the rest of the patch.

From-SVN: r220254
2015-01-29 08:47:25 -08:00
Jonathan Wakely 85d44192f6 atomic_base.h: Use __always_inline__ instead of always_inline.
* include/bits/atomic_base.h: Use __always_inline__ instead of
	always_inline.
	* include/bits/atomic_futex.h: Likewise.
	* include/bits/c++config: Use __abi_tag__ instead of abi_tag.
	* include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Use
	__packed__ instead of packed.
	* include/std/shared_mutex: Use __unused__ instead of unused.
	* testsuite/17_intro/headers/c++1998/all_attributes.cc: New.
	* testsuite/17_intro/headers/c++200x/all_attributes.cc: New.
	* testsuite/17_intro/headers/c++2014/all_attributes.cc: New.

From-SVN: r220243
2015-01-29 12:47:20 +00:00
Caroline Tice f7f049fa46 Committing VTV Cygwin patch for Patrick Wollgast
* gcc/config/i386/cygwin.h (STARTFILE_SPEC): Add vtv_start.o,
    if -fvtable-verify=preinit/std is used.
* gcc/config/i386/mingw-w64.h (STARTFILE_SPEC): Likewise.
* gcc/config/i386/mingw32.h (STARTFILE_SPEC): Likewise.
* gcc/config/i386/cygwin.h (ENDFILE_SPEC): Add vtv_end.o,
    if -fvtable-verify=preinit/std is used.
* gcc/config/i386/mingw32.h (ENDFILE_SPEC): Likewise.
* gcc/config/i386/cygwin.h (LIB_SPEC): Pass -lvtv and -lpsapi,
    if -fvtable-verify=preinit/std is used.
* gcc/config/i386/mingw-w64.h (LIB_SPEC): Likewise.
* gcc/config/i386/mingw32.h (LIB_SPEC): Likewise.

* gcc/cp/vtable-class-hierarchy.c (vtv_generate_init_routine): Add
    check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.

* gcc/varasm.c (assemble_variable): Add code to properly set the comdat
    section and name for the .vtable_map_vars section in case the
    target is PE or COFF.


* libgcc/Makefile.in: Move rules to build vtv_*.o out of the check
    for CUSTOM_CRTSTUFF.
* libgcc/config.host (i[34567]86-*-cygwin*, x86_64-*-cygwin*, i[34567]86-*-mingw*)
    (x86_64-*-mingw*): Only add vtv_*.o to extra_parts if enable_vtable_verify.


* libstdc++-v3/acinclude.m4: Define VTV_CYGMIN.
* libstdc++-v3/configure: Regenerate.

* libstdc++-v3/libsupc++/Makefile.am: Add vtv_sources only to
    libsupc___la_SOURCES and libsupc__convenience_la_SOURCES if VTV_CYGMIN is
    not set.
* libstdc++-v3/libsupc++/Makefile.in: Regenerated.
* libstdc++-v3/libsupc++/vtv_stubs.cc: Add none weak declaration of every
    function for Cygwin and MinGW.

* libstdc++-v3/src/Makefile.am: Add libvtv.la to toolexeclib_LTLIBRARIES,
    if VTV_CYGMIN is set. Define libvtv_la_SOURCES, libvtv_la_LDFLAGS,
    libvtv_la_AM_CXXFLAGS and libvtv_la_LINK if VTV_CYGMIN is set.
* libstdc++-v3/src/Makefile.in: Regenerate.


* libvtv/Makefile.am : Add libvtv.la to toolexeclib_LTLIBRARIES, if VTV_CYGMIN
    is set. Define libvtv_la_LIBADD, libvtv_la_LDFLAGS, libvtv_stubs_la_LDFLAGS
    and libvtv_stubs_la_SOURCES if VTV_CYGMIN is set. Add obstac.c to
    libvtv_la_SOURCES if VTV_CYGMIN is set.
* libvtv/Makefile.in : Regenerate.
* libvtv/aclocal.m4 : Regenerate.
* libvtv/configure : Regenerate.
* libvtv/configure.ac : Add ACX_LT_HOST_FLAGS. Define VTV_CYGMIN.
* libvtv/configure.tgt : (x86_64-*-cygwin*, i?86-*-cygwin*, x86_64-*-mingw*)
    (i?86-*-mingw*): Add to supported targets.
* libvtv/vtv_fail.cc : Skip inclusion of execinfo.h on Cygwin and MinGW.
(log_error_message): Skip calls to backtrace and backtrace_symbols_fd on Cygwin
    and MinGW.
* libvtv/vtv_malloc.cc : Include windows.h and skip sys/mman.h inclusion on
    Cygwin and MinGW. Add sysconf port on Cygwin and MinGW.
(obstack_chunk_alloc): Exchange call to mmap with call to VirtualAlloc on Cygwin
    and MinGW.
(__vtv_malloc_init): Exchange call to sysconf with call to port of sysconf on
    Cygwin and MinGW.
* libvtv/vtv_malloc.h : Declare mprotect and define PROT_READ and PROT_WRITE on
    Cygwin and MinGW.
* libvtv/map.h : Include stdint.h on MinGW.
* libvtv/rts.cc : Include windows.h, winternl.h and psapi.h, skip include of
    execinfo.h, sys/mman.h and link.h on Cygwin and MinGW.
    Add port of __fortify_fail on Cygwin and MinGW.
    Change ElfW (Addr) to uintptr_t on Cygwin and MinGW.
(read_section_offset_and_length): Add port for Cygwin and MinGW
(iterate_modules): New function.
(vtv_unprotect_vtable_vars): Use iterate_modules instead of dl_iterate_phdr on
    Cygwin and MinGW.
(vtv_protect_vtable_vars): Likewise.
(count_all_pages): Likewise.
(dl_iterate_phdr_count_pages): Don't build on Cygwin and MinGW.
* libvtv/utils.cc : Include windows.h and skip execinfo.h inclusion on
    Cygwin and MinGW.
(__vtv_open_log): Exchange call to getuid and getpid with GetCurrentProcessId and
    adjust call to snprintf accordingly on Cygwin and MinGW.
    Adjust calls to mkdir on MinGW.
    Adjust call to open on Cygwin and MinGW.
(__vtv_add_to_log): Adjust call to snprintf on Cygwin and MinGW.
(__vtv_log_verification_failure): Don't generate a backtrace on Cygwin and MinGW.

From-SVN: r220232
2015-01-29 00:03:56 -08:00
Jonathan Wakely 739cdc9041 re PR libstdc++/64828 (libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat])
PR libstdc++/64828
	* libsupc++/Makefile.am: Compile del_opvs.cc as C++14.
	* libsupc++/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.

From-SVN: r220207
2015-01-28 15:02:28 +00:00
Kyrylo Tkachov f6d04238e0 [libstdc++][testsuite][reverted] Remove check for truncation overflow
* testsuite/lib/libstdc++.exp (v3_target_compile): Remove
    check for unsupported.
    (v3_target_compile_as_c): Likewise.

From-SVN: r220206
2015-01-28 13:53:45 +00:00
Richard Biener 8aa33fadbe re PR libstdc++/64798 (g++.old-deja/g++.eh/badalloc1.C FAILs)
2015-01-28  Richard Biener  <rguenther@suse.de>

	PR libstdc++/64798
	* libsupc++/eh_alloc.cc (struct allocated_entry): Align
	data member.
	(pool::allocate): Adjust allocation size and alignment to
	that change.
	(pool::free): Adjust pointer offsetting.

From-SVN: r220201
2015-01-28 09:53:39 +00:00
Jonathan Wakely 506f03c370 re PR target/64368 (Several libstdc++ test failures on non-linux platforms after r218964.)
PR libstdc++/64368
	* include/std/shared_mutex (shared_timed_mutex::try_lock_for,
	shared_timed_mutex::try_lock_until): Only define when POSIX thread
	timeouts option is supported.
	(shared_timed_mutex::try_shared_lock_for,
	shared_timed_mutex::try_shared_lock_until): Likewise.

From-SVN: r220161
2015-01-27 11:12:04 +00:00
Jonathan Wakely 831a3a9e34 re PR target/64368 (Several libstdc++ test failures on non-linux platforms after r218964.)
PR libstdc++/64368
	* config/locale/gnu/numeric_members.cc (numpunct<char>::~numpunct(),
	numpunct<wchar_t>::~numpunct()): Do not set _M_data->_M_grouping.
	* src/c++11/cxx11-shim_facets.cc (numpunct_shim): Remove _M_grouping
	and use cache's _M_grouping field.
	(__numpunct_fill_cache): Likewise.
	(__moneypunct_fill_cache): Improve comments.

From-SVN: r220143
2015-01-26 23:42:39 +00:00
Jonathan Wakely c7ac7ddaa9 2.cc: Add test for non-transparent comparison function.
* testsuite/23_containers/set/operations/2.cc: Add test for
	non-transparent comparison function.

From-SVN: r220107
2015-01-26 11:18:14 +00:00
Oleg Endo 5eb1643c2c re PR libstdc++/29366 (atomics config for sh is weird)
libstdc++-v3/
	PR target/29366
	* config/cpu/sh/atomicity.h (__exchange_and_add, __atomic_add): 
	Remove SH4A inline asm and lock based implementations and use the
	defaults from ext/atomicity.h.

From-SVN: r220094
2015-01-25 16:54:33 +00:00
Jonathan Wakely 130dc027c5 gnu.ver: Tighten GLIBCXX_3.4 patterns to not match new std::string constructors for...
* config/abi/pre/gnu.ver: Tighten GLIBCXX_3.4 patterns to not match
	new std::string constructors for byname facets.

From-SVN: r220043
2015-01-23 15:23:20 +00:00
Richard Biener cce93c76ba re PR libstdc++/64535 (Emergency buffer for exception allocation too small)
2015-01-22  Richard Biener  <rguenther@suse.de>

	PR libstdc++/64535
	* libsupc++/eh_alloc.cc: Include new.
	(bitmask_type): Remove.
	(one_buffer): Likewise.
	(emergency_buffer): Likewise.
	(emergency_used): Likewise.
	(dependents_buffer): Likewise.
	(dependents_used): Likewise.
	(class pool): New custom fixed-size arena, variable size object
	allocator.
	(emergency_pool): New global.
	(__cxxabiv1::__cxa_allocate_exception): Use new emergency_pool.
	(__cxxabiv1::__cxa_free_exception): Likewise.
	(__cxxabiv1::__cxa_allocate_dependent_exception): Likewise.
	(__cxxabiv1::__cxa_free_dependent_exception): Likewise.

	* g++.old-deja/g++.eh/badalloc1.C: Adjust.

From-SVN: r219988
2015-01-22 09:21:48 +00:00
Tim Shen 770acfc9e3 re PR libstdc++/64680 (basic_regex::operator= does not reset flags)
PR libstdc++/64680
	* include/bits/regex.h (basic_regex<>::basic_regex,
	basic_regex<>::operator=, basic_regex<>::imbue): Conform to the
	standard interface.
	* testsuite/28_regex/basic_regex/assign/char/cstring.cc: New testcase.

From-SVN: r219987
2015-01-22 05:07:03 +00:00
Tim Shen 77033d2668 re PR libstdc++/64649 (regex_traits::lookup_classname() only works with random access iterators)
PR libstdc++/64649
	* include/bits/regex.tcc (regex_traits<>::lookup_collatename,
	regex_traits<>::lookup_classname): Correctly narrow input chars.
	* testsuite/28_regex/traits/wchar_t/user_defined.cc: New testcase.

From-SVN: r219986
2015-01-22 05:02:38 +00:00
Jonathan Wakely f81f49c180 * config/abi/pre/gnu.ver: Use [jmy] for size_t parameters.
From-SVN: r219953
2015-01-21 16:17:31 +00:00
Jonathan Wakely deff1f4105 * testsuite/29_atomics/atomic/64658.cc: Test stored value.
From-SVN: r219952
2015-01-21 16:17:17 +00:00
Jonathan Wakely 7d56e747e2 status_cxx2011.xml: Remove stray dbhtml tags.
* doc/xml/manual/status_cxx2011.xml: Remove stray dbhtml tags.
	* doc/xml/manual/status_cxx2014.xml: Update status.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r219891
2015-01-20 12:31:22 +00:00
Jonathan Wakely 4159cf0d22 re PR libstdc++/64650 (std::experimental::bad_optional_access is not default constructible)
PR libstdc++/64650
	* include/experimental/optional (bad_optional_access): Add default
	constructor.
	* testsuite/experimental/optional/requirements.cc: Test for default
	constructor.

From-SVN: r219889
2015-01-20 11:51:03 +00:00
Jonathan Wakely 91c78ea5b6 Implement N3657: heterogeneous lookup in associative containers.
* include/bits/stl_map.h (map::find<>, map::count<>,
	map::lower_bound<>, map::upper_bound<>, map::equal_range<>): New
	member function templates to perform heterogeneous lookup.
	* include/bits/stl_multimap.h (multimap::find<>, multimap::count<>,
	multimap::lower_bound<>, multimap::upper_bound<>,
	multimap::equal_range<>): Likewise.
	* include/bits/stl_multiset.h (multiset::find<>, multiset::count<>,
	multiset::lower_bound<>, multiset::upper_bound<>,
	multiset::equal_range<>): Likewise.
	* include/bits/stl_set.h (set::find<>, set::count<>,
	set::lower_bound<>, set::upper_bound<>, set::equal_range<>): Likewise.
	* include/bits/stl_tree.h (_Rb_tree::_S_lower_bound_tr,
	_Rb_tree::_S_upper_bound_tr, _Rb_tree::_M_find_tr,
	_Rb_tree::_M_count_tr, _Rb_tree::_M_lower_bound_tr,
	_Rb_tree::_M_upper_bound_tr, _Rb_tree::_M_equal_range_tr): Likewise.
	* testsuite/23_containers/map/operations/2.cc: New.
	* testsuite/23_containers/multimap/operations/2.cc: New.
	* testsuite/23_containers/multiset/operations/2.cc: New.
	* testsuite/23_containers/set/operations/2.cc: New.

From-SVN: r219888
2015-01-20 11:50:58 +00:00
Jonathan Wakely 71a16cd8bc Add C++11 std::string constructors for locales and facets.
* config/abi/pre/gnu.ver: Export new constructors.
	* include/bits/codecvt.h (codecvt_byname): Add string constructor.
	(codecvt_byname<char16_t>, codecvt_byname<char32_t>): Define explicit
	specializations and declare explicit instantiations.
	* include/bits/locale_classes.h (locale, collate_byname): Add string
	constructors.
	* include/bits/locale_facets.h (ctype_byname, numpunct_byname):
	Likewise.
	* include/bits/locale_facets_nonio.h (time_get_byname,
	time_put_byname, moneypunct_byname, messages_byname): Likewise.
	* src/c++11/codecvt.cc (codecvt_byname<char16_t>,
	codecvt_byname<char32_t>): Define explicit instantiations.
	* src/c++11/locale-inst.cc (time_put_byname, codecvt_byname):
	Instantiate string constructors.
	(ctype_byname): Define string constructor.
	* testsuite/22_locale/codecvt_byname/1.cc: New.
	* testsuite/22_locale/collate_byname/1.cc: New.
	* testsuite/22_locale/ctype_byname/2.cc: New.
	* testsuite/22_locale/messages_byname/1.cc: New.
	* testsuite/22_locale/moneypunct_byname/1.cc: New.
	* testsuite/22_locale/numpunct_byname/1.cc: New.

From-SVN: r219887
2015-01-20 11:50:51 +00:00
Jonathan Wakely 0e4974d62e re PR libstdc++/64658 (std::atomic_init() undefined)
PR libstdc++/64658
	* include/std/atomic (atomic_init): Define.
	* testsuite/29_atomics/atomic/64658.cc: New.

From-SVN: r219886
2015-01-20 11:50:43 +00:00
Tim Shen e5f3553320 re PR libstdc++/64649 (regex_traits::lookup_classname() only works with random access iterators)
PR libstdc++/64649
	* include/bits/regex.tcc (regex_traits<>::lookup_collatename,
	regex_traits<>::lookup_classname): Support forward iterators.
	* testsuite/28_regex/traits/char/lookup_classname.cc: New testcases.
	* testsuite/28_regex/traits/char/lookup_collatename.cc: New testcase.

From-SVN: r219866
2015-01-19 23:00:13 +00:00
Tim Shen 60c176fb45 re PR libstdc++/64584 (basic_regex::assign breaks *this if it throws regex_error)
PR libstdc++/64584
	PR libstdc++/64585
	* include/bits/regex.h (basic_regex<>::basic_regex,
	basic_regex<>::assign, basic_regex<>::imbue,
	basic_regex<>::swap, basic_regex<>::mark_count): Drop NFA after
	imbuing basic_regex; Make assign() transactional against exception.
	* include/bits/regex_compiler.h (__compile_nfa<>): Add back
	__compile_nfa SFINAE.
	* include/std/regex: Adjust include order to avoid __compile_nfa
	forward declaration.
	* testsuite/28_regex/basic_regex/assign/char/string.cc: New testcase.
	* testsuite/28_regex/basic_regex/imbue/string.cc: New testcase.

From-SVN: r219865
2015-01-19 22:56:04 +00:00
Ville Voutilainen 8bae22b708 range_access.h (begin, end): Use _GLIBCXX14_CONSTEXPR on overloads for arrays.
2015-01-19  Ville Voutilainen  <ville.voutilainen@gmail.com>
	    Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/range_access.h (begin, end): Use _GLIBCXX14_CONSTEXPR
	on overloads for arrays.
	(cbegin, cend, rbegin, rend, crbegin, crend): New.
	* testsuite/24_iterators/range_access_cpp14.cc: New.

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

From-SVN: r219846
2015-01-19 14:37:03 +00:00
Jonathan Wakely 257024e31e re PR libstdc++/64646 (New overloads of std::is_permutation dereference past-the-end iterator)
PR libstdc++/64646
	* include/bits/stl_algo.h (__is_permutation): Also test for reaching
	end of the second range.
	* testsuite/25_algorithms/is_permutation/64646.cc: New.

From-SVN: r219821
2015-01-18 16:31:06 +00:00
Jonathan Wakely fded3d73da status_cxx2011.xml: Remove note about offsetof.
* doc/xml/manual/status_cxx2011.xml: Remove note about offsetof.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r219817
2015-01-18 15:47:18 +00:00
Jonathan Wakely 1e3919acb1 * src/c++11/futex.cc: Fix order of includes and preprocessor condition.
From-SVN: r219816
2015-01-18 14:38:53 +00:00
Jonathan Wakely 87361f3098 atomic_futex.h: Use mutex and condition_variable when atomic int is not lock-free.
* include/bits/atomic_futex.h: Use mutex and condition_variable when
	atomic int is not lock-free. Make member variables private.
	* src/c++11/futex.cc: Likewise.

From-SVN: r219815
2015-01-18 14:25:22 +00:00
Jonathan Wakely c6c1bfd99b re PR libstdc++/64638 (Build failure with recent futex changes in libstdc++, likely all non-gthreads targets)
PR libstdc++/64638
	* include/bits/atomic_futex.h: Use appropriate config macros for
	availability of std::mutex, std::condition and std::chrono.

From-SVN: r219799
2015-01-17 13:48:48 +00:00
Ville Voutilainen 21c4af433b status_cxx2011.xml: Update C++11 status.
2015-01-17  Ville Voutilainen  <ville.voutilainen@gmail.com>
	    Jonathan Wakely  <jwakely@redhat.com>

	* doc/xml/manual/status_cxx2011.xml: Update C++11 status.
	* doc/html/*: Regenerate.

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

From-SVN: r219794
2015-01-17 03:23:52 +00:00
Jonathan Wakely 1d0a12dc55 DR 488 PR libstdc++/58357
DR 488
	PR libstdc++/58357
	* include/bits/algorithmfwd.h (rotate): Return an iterator.
	* include/bits/stl_algo.h (rotate, __rotate): Likewise.
	* testsuite/25_algorithms/rotate/dr488.cc: New.
	* testsuite/25_algorithms/rotate/check_type.cc: Adjust function type.
	* testsuite/25_algorithms/rotate/requirements/explicit_instantiation/
	2.cc: Likewise.
	* testsuite/25_algorithms/rotate/requirements/explicit_instantiation/
	pod.cc: Likewise.

From-SVN: r219793
2015-01-17 03:15:52 +00:00
Jonathan Wakely d31b87976f re PR libstdc++/60940 (general operations on atomic types do not work with atomic integral typedefs)
PR libstdc++/60940
	* include/bits/atomic_base.h: Remove atomic integral typedefs as
	synonyms for __atomic_base<int> etc.
	* include/std/atomic: Make atomic_int a synonym for atomic<int> and
	likewise for all atomic integral types.
	* testsuite/29_atomics/atomic_integral/cons/copy_list.cc: New.
	* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.

From-SVN: r219790
2015-01-17 01:23:28 +00:00
Jonathan Wakely 3ecec1eff7 re PR libstdc++/56785 (std::tuple of two elements does not apply empty base class optimization when one of its elements is a std::tuple with two elements)
PR libstdc++/56785
	* include/std/tuple (_Tuple_impl): Remove zero-element specialization
	and define one-element specialization.
	* testsuite/20_util/tuple/56785.cc: New.

From-SVN: r219785
2015-01-17 00:21:41 +00:00
Jonathan Wakely c23ccace5c 1.cc: Remove unused header.
* testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc:
	Remove unused header.
	* testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc:
	Likewise.
	* testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
	Likewise.

From-SVN: r219781
2015-01-17 00:12:50 +00:00
Jonathan Wakely 96d8c147aa locale_conv.h (wstring_convert, [...]): New.
* include/bits/locale_conv.h (wstring_convert, wbuffer_convert): New.
	* include/std/locale: Include new header.
	* include/Makefile.am: Add it.
	* include/Makefile.in: Regenerate.
	* testsuite/22_locale/conversions/buffer/requirements/typedefs.cc: New.
	* testsuite/22_locale/conversions/string/1.cc: New.
	* testsuite/22_locale/conversions/string/2.cc: New.
	* testsuite/22_locale/conversions/string/requirements/typedefs.cc: New.
	* testsuite/22_locale/conversions/string/requirements/typedefs-2.cc:
	New.

From-SVN: r219780
2015-01-16 23:38:48 +00:00
Jonathan Wakely 28af1fb39d Implement C++11 <codecvt> header.
* config/abi/pre/gnu.ver: Export new symbols.
	* include/Makefile.am: Add codecvt.
	* include/Makefile.in: Regenerate.
	* include/std/codecvt: New header.
	* src/c++11/codecvt.cc (__codecvt_utf8_base, __codecvt_utf16_base,
	__codecvt_utf8_utf16_base): Define specializations.
	* testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc: New.
	* testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc: New.
	* testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
	New.

From-SVN: r219779
2015-01-16 23:38:35 +00:00
Torvald Riegel eae801bacc libstdc++: Optimize synchronization in std::future if futexes are available.
* src/c++11/futex.cc: New file.
	* include/bits/atomic_futex.h: New file.
	* include/std/future (__future_base::_State_baseV2): Use
	atomic_futex_unsigned instead of mutex+condvar.
	* src/c++11/futex.cc: Likewise.
	* include/Makefile.am: Add atomic_futex.h.
	* include/Makefile.in: Likewise.
	* src/c++11/Makefile.am: Add futex.cc.
	* src/c++11/Makefile.in: Likewise.

From-SVN: r219770
2015-01-16 19:50:43 +00:00
Jonathan Wakely bb93f35da1 acinclude.m4: Fix typo in comment.
* acinclude.m4: Fix typo in comment.
	* configure: Regenerate.
	* include/bits/codecvt.h (codecvt<char16_t, char, mbstate_t>,
	codecvt<char16_t, char, mbstate_t>): Declare specializations.
	* include/bits/locale_facets.h: Reserve space for new specializations.
	* src/c++11/Makefile.am: Add codecvt.cc.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++11/codecvt.cc: New.
	* src/c++98/Makefile.am: Compile locale_init.cc and localename.cc
	with -std=gnu++11.
	* src/c++98/Makefile.in: Regenerate.
	* src/c++98/locale_init.cc: Initialize new codecvt specializations.
	* src/c++98/localename.cc: Likewise.
	* config/abi/pre/gnu.ver: Exports for new codecvt specializations.
	* testsuite/22_locale/codecvt/utf8.cc: New.
	* testsuite/22_locale/locale/cons/unicode.cc: Check that new
	specializations are installed in locale objects.

From-SVN: r219747
2015-01-16 15:02:35 +00:00
Torvald Riegel 6220fdff17 libstdc++: Add POSIX variant of shared_timed_mutex.
* include/std/shared_mutex (shared_timed_mutex): Add POSIX-based
	implementation.

From-SVN: r219737
2015-01-16 13:22:00 +00:00
Jonathan Wakely 6eb6148159 re PR libstdc++/64571 (Link failure with fstream due to new string implementation)
PR libstdc++/64571
	* config/abi/pre/gnu.ver: Export fstream functions using new string.

From-SVN: r219537
2015-01-13 14:56:50 +00:00
Jonathan Wakely 1b9ad1d9ae re PR libstdc++/64553 (Missing '# ifdef _GLIBCXX_USE_WCHAR_T' in src/c++11/cxx11-shim_facet.cc)
PR libstdc++/64553
	* src/c++11/cxx11-shim_facets.cc: Check for wchar_t support.

From-SVN: r219496
2015-01-12 21:45:50 +00:00
Jonathan Wakely 5e67acc9a0 re PR libstdc++/64560 (building libstdc++ with -fno-rtti fails in new cxx11-shim-facets.cc file)
PR libstdc++/64560
	* src/c++11/cxx11-shim_facets.cc (locale::facet::_M_sso_shim): Check
	for RTTI support.

From-SVN: r219495
2015-01-12 21:45:44 +00:00
Thomas Schwinge f1f3453e11 libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library.
libgomp/
	* configure.ac: Rename libgomp from "GNU OpenMP Runtime Library"
	to "GNU Offloading and Multi Processing Runtime Library".  Change
	all users.
	* configure: Regenerate.
	* libgomp.texi: Update.
	gcc/
	* doc/install.texi: Update for libgomp being renamed from "GNU
	OpenMP Runtime Library" to "GNU Offloading and Multi Processing
	Runtime Library".
	* doc/sourcebuild.texi: Likewise.
	gcc/fortran/
	* gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
	Runtime Library" to "GNU Offloading and Multi Processing Runtime
	Library".
	* intrinsic.texi: Likewise.
	libstdc++-v3/
	* doc/xml/manual/parallel_mode.xml: Update for libgomp being
	renamed from "GNU OpenMP Runtime Library" to "GNU Offloading and
	Multi Processing Runtime Library".

Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
Co-Authored-By: Julian Brown <julian@codesourcery.com>

From-SVN: r219425
2015-01-10 20:10:37 +01:00
Jonathan Wakely 0edf5aadea re PR libstdc++/64476 (std::uninitialized_copy tests assignability the wrong way, resulting in performance pessimization)
PR libstdc++/64476
	* include/bits/stl_uninitialized.h (uninitialized_copy): Fix
	is_assignable arguments.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy/64476.cc:
	New.

From-SVN: r219398
2015-01-09 18:02:47 +00:00
Andreas Tobler 4c470097be unwind-arm-common.h: Revert previous commit.
gcc:
    * ginclude/unwind-arm-common.h: Revert previous commit.

libstdc++-v3:
    * libsupc++/unwind-cxx.h: Revert previous commit.

From-SVN: r219392
2015-01-09 15:22:19 +01:00
Andreas Tobler 82a19768cb configure.ac: Don't add ${libgcj} for arm*-*-freebsd*.
toplevel:

    * configure.ac: Don't add ${libgcj} for arm*-*-freebsd*.
    * configure: Regenerate.
gcc:
    * config.gcc (arm*-*-freebsd*): New configuration.
    * config/arm/freebsd.h: New file.
    * config.host: Add extra components for arm*-*-freebsd*.
    * config/arm/arm.h: Introduce MAX_SYNC_LIBFUNC_SIZE.
    * config/arm/arm.c (arm_init_libfuncs): Use MAX_SYNC_LIBFUNC_SIZE.

libgcc:

    * config.host (arm*-*-freebsd*): Add new configuration for
    arm*-*-freebsd*.
    * config/arm/freebsd-atomic.c: New file.
    * config/arm/t-freebsd: Likewise.
    * config/arm/unwind-arm.h: Add __FreeBSD__ to the list of
    'PC-relative indirect' OS's.

libatomic:

    * configure.tgt: Exclude arm*-*-freebsd* from try_ifunc.

libstdc++-v3:

    * configure.host: Add arm*-*-freebsd* port_specific_symbol_files.

From-SVN: r219388
2015-01-09 15:06:02 +01:00
Tim Shen a8e67466d3 re PR libstdc++/64239 (regex_iterator::operator= should copy match_results::position)
PR libstdc++/64239
	* include/bits/regex.h (match_results<>::swap): Use std::swap
	instead of swap.
	* include/bits/regex_compiler.tcc (_Compiler<>::_M_quantifier):
	Likewise.
	* testsuite/28_regex/match_results/swap.cc: New testcase.

From-SVN: r219373
2015-01-09 03:58:59 +00:00
Jonathan Wakely c66b93fe20 re PR libstdc++/60132 (C++11: lack of is_trivially_copy_constructible)
PR libstdc++/60132
	* include/std/type_traits (has_trivial_default_constructor,
	has_trivial_copy_constructor, has_trivial_copy_assign): Add deprecated
	attribute.
	* testsuite/20_util/has_trivial_copy_assign/requirements/
	explicit_instantiation.cc: Use -Wno-deprecated.
	* testsuite/20_util/has_trivial_copy_assign/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/has_trivial_copy_assign/value.cc: Likewise.
	* testsuite/20_util/has_trivial_copy_constructor/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/has_trivial_copy_constructor/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/has_trivial_copy_constructor/value.cc: Likewise.
	* testsuite/20_util/has_trivial_default_constructor/requirements/
	explicit_instantiation.c: Likewise.
	* testsuite/20_util/has_trivial_default_constructor/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/has_trivial_default_constructor/value.cc:
	Likewise.
	* testsuite/20_util/pair/requirements/dr801.cc: Replace deprecated
	trait.
	* testsuite/20_util/tuple/requirements/dr801.cc: Likewise.
	* testsuite/util/testsuite_common_types.h: Likewise.

From-SVN: r219350
2015-01-08 16:24:55 +00:00
Jonathan Wakely ea0b599a91 * include/bits/hashtable_policy.h: Use __bool_constant.
From-SVN: r219343
2015-01-08 13:27:30 +00:00
Jonathan Wakely 23608da4db Makefile.am: Compile del_ops.cc as C++14.
* libsupc++/Makefile.am: Compile del_ops.cc as C++14.
	* libsupc++/Makefile.in: Regenerate.

From-SVN: r219317
2015-01-07 17:08:11 +00:00
Jonathan Wakely 63f2136103 * config/abi/pre/gnu.ver: Fix version conflict for std::locale::name().
From-SVN: r219260
2015-01-06 13:13:36 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Jonathan Wakely f034f3709a re PR libstdc++/64483 (FAIL: 18_support/exception_ptr/64241.cc (test for excess errors))
PR libstdc++/64483
	* testsuite/18_support/exception_ptr/64241.cc: Use
	dg-require-atomic-builtins.

From-SVN: r219174
2015-01-04 14:03:11 +00:00
Jonathan Wakely b0e657557c 64422.cc: Fix copyright date.
* testsuite/21_strings/basic_string/modifiers/64422.cc: Fix copyright
	date.

From-SVN: r219153
2015-01-02 22:46:22 +00:00
Tim Shen d0cbab5fed re PR libstdc++/64475 (FAIL: 28_regex/algorithms/regex_match/ecma/char/backref.cc)
PR libstdc++/64475
	* include/bits/regex_executor.tcc (_Executor<>::_M_dfs): Copy the
	iterator, since the original one shouldn't be mutated.

From-SVN: r219151
2015-01-02 22:33:04 +00:00
Bernd Edlinger e4dd5b691d re PR c++/64422 (basic_string::erase is unresloved)
2015-01-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR libstdc++/64422
        * src/c++98/misc-inst.cc (string::erase): Add missing overloads.
        (string::insert): Likewise.
        (string::replace): Likewise.
        (wstring::erase): Likewise.
        (wstring::insert): Likewise.
        (wstring::replace): Likewise.
        * testsuite/21_strings/basic_string/modifiers/64422.cc: New testcase.

From-SVN: r219149
2015-01-02 21:12:54 +00:00
Jonathan Wakely 6e4d8cb651 re PR web/64468 (Incorrect indentation in Doxygen-generated sources of libstdc++)
PR libstdc++/64468
	* doc/doxygen/user.cfg.in: Set correct TAB_SIZE.

From-SVN: r219147
2015-01-02 16:50:51 +00:00
Jonathan Wakely b4df5e92de re PR libstdc++/64438 (Removing string-conversion requirement causes libstdc++-v3 fails on AArch64.)
PR libstdc++/64438
	* testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc:
	Revert removal of dg-require-string-conversions.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/
	stoull.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/
	to_string.cc: Likewise.

From-SVN: r219146
2015-01-02 16:50:45 +00:00
Jonathan Wakely 42211dd360 Rotate libstdc++-v3/ChangeLog
From-SVN: r219145
2015-01-02 16:50:36 +00:00
Tim Shen ec5f010299 re PR libstdc++/64441 (A match_results returns an incorrect sub_match if the sub_match::matched is false)
PR libstdc++/64441
	* include/bits/regex.tcc (__regex_algo_impl): s/auto/auto&/.
	* include/bits/regex_executor.tcc (_Executor<>::_M_dfs): Likewise.

From-SVN: r219121
2014-12-31 10:27:41 +00:00
David Edelsohn 8cd2f58d84 c99_classification_macros_c.cc: Add *-*-aix* to dg-xfail-if, dg-excess-errors.
* testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
        Add *-*-aix* to dg-xfail-if, dg-excess-errors.

From-SVN: r219097
2014-12-28 21:09:31 -05:00
Jonathan Wakely 28630cd6bc Compile locale-inst.cc and wlocale-inst.cc as C++11.
PR libstdc++/64389
	* src/c++11/Makefile.am: Add locale-inst.cc and wlocale-inst.cc.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++11/locale-inst.cc: Move from src/c++98/.
	* src/c++11/wlocale-inst.cc: Likewise.
	* src/c++11/cxx11-locale-inst.cc: Adjust path to locale-inst.cc.
	* src/c++11/string-inst.cc: Remove time_get instantiations.
	* src/c++98/Makefile.am: Remove locale-inst.cc and wlocale-inst.cc.
	* src/c++98/Makefile.in: Regenerate.
	* src/c++98/locale-inst.cc: Move to src/c++11/.
	* src/c++98/wlocale-inst.cc: Likewise.

From-SVN: r219050
2014-12-23 23:30:33 +00:00
Paolo Carlini 59aa28e80f basic_string.h: Fix _S_local_capacity for large sizeof(_CharT).
2014-12-22  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/basic_string.h: Fix _S_local_capacity for
	large sizeof(_CharT).

From-SVN: r219031
2014-12-22 18:58:44 +00:00
Jonathan Wakely f37f5fb81c re PR libstdc++/37522 (Incorrect vswprintf prototype breaks __to_xstring)
PR libstdc++/37522
	* include/bits/basic_string.h (stod, stof, stoi, stol, stold, stoll,
	stoul, stoull, to_string): Only use _GLIBCXX_HAVE_BROKEN_VSWPRINTF
	to guard definition of to_wstring.
	* testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc:
	Do not use dg-require-string-conversions.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/
	stoull.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/
	to_string.cc: Likewise.

From-SVN: r219019
2014-12-22 16:41:39 +00:00
Ville Voutilainen 8dff34fe8e re PR libstdc++/60271 ([DR2369] [C++1y] std::max(initializer_list<T>) cannot use std::max_element)
2014-12-22  Ville Voutilainen  <ville.voutilainen@gmail.com>

	PR libstdc++/60271
	C++14 constexpr min, max, minmax, min_element, max_element
	and minmax_element. Also constexpr for 20.9.5-20.9.9,
	aka various library functors.
	* include/bits/c++config: Add _GLIBCXX14_CONSTEXPR.
	* include/bits/algorithmfwd.h (min, max, minmax, min_element,
	max_element): Use it.
	* include/bits/predefined_ops.h (_Iter_less_iter, __iter_less_iter,
	_Iter_comp_iter, __iter_comp_iter): Likewise.
	* include/bits/stl_algo.h (minmax, __minmax_element, minmax_element,
	min, max, __min_element, min_element, __max_element, max_element)
	Likewise.
	* include/bits/stl_algobase.h (min, max): Likewise.
	* include/bits/stl_function.h (plus, minus, multiplies, divides,
	modulus, negate, equal_to, not_equal_to, greater, less, greater_equal,
	less_equal, logical_and, logical_or, logical_not, bit_and, bit_or,
	bit_xor, bit_not, unary_negate, not1, binary_negate, not2): Likewise.
	* testsuite/20_util/function_objects/constexpr.cc: New.
	* testsuite/25_algorithms/max/constexpr.cc: Likewise.
	* testsuite/25_algorithms/max_element/constexpr.cc: Likewise.
	* testsuite/25_algorithms/min/constexpr.cc: Likewise.
	* testsuite/25_algorithms/min_element/constexpr.cc: Likewise.
	* testsuite/25_algorithms/minmax/constexpr.cc: Likewise.
	* testsuite/25_algorithms/minmax_element/constexpr.cc: Likewise.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error.

From-SVN: r219015
2014-12-22 16:00:16 +00:00
Jonathan Wakely 3f5f101874 status_cxx2011.xml: Update.
* doc/xml/manual/status_cxx2011.xml: Update.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r219014
2014-12-22 14:49:09 +00:00
Rüdiger Sonderfeld 0de0b10caa re PR libstdc++/54354 (TODO extended iomanip manipulators std::get_time and std::put_time (C++11, section 27.7.5))
2014-12-22  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>

	PR libstdc++/54354
	* include/std/iomanip (_Get_time): New struct.
	(get_time): New manipulator.
	(operator<<): New overloaded function.
	* testsuite/27_io/manipulators/extended/get_time/char/1.cc: New.
	* testsuite/27_io/manipulators/extended/get_time/char/2.cc: New.
	* testsuite/27_io/manipulators/extended/get_time/wchar_t/1.cc: New.
	* testsuite/27_io/manipulators/extended/get_time/wchar_t/2.cc: New.

From-SVN: r219013
2014-12-22 13:45:52 +00:00
Rüdiger Sonderfeld e869c0900c re PR libstdc++/60396 (Missing time_get<>::get() functions)
2014-12-22  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
	    Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/60396
	* config/abi/pre/gnu.ver: Add new exports.
	* include/bits/locale_facets_nonio.h (time_get::get): New overloads.
	(time_get::do_get):  New virtual function.
	* include/bits/locale_facets_nonio.tcc (time_get::get): Define.
	(time_get::do_get): Define.
	* src/c++11/string-inst.cc (time_get::get, time_get::do_get): Add
	C++11-only instantiations.
	* testsuite/22_locale/time_get/get/char/1.cc: New.
	* testsuite/22_locale/time_get/get/char/2.cc: New.
	* testsuite/22_locale/time_get/get/wchar_t/1.cc: New.
	* testsuite/22_locale/time_get/get/wchar_t/2.cc: New.

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

From-SVN: r219012
2014-12-22 13:45:44 +00:00
Jonathan Wakely 8b6425215f re PR libstdc++/64367 (g++-v5/stdexcept:52:28: error: invalid use of non-static data member '_M_p')
PR libstdc++/64367
	* include/std/stdexcept: Don't use non-static member in sizeof.

From-SVN: r218997
2014-12-21 15:16:08 +00:00
François Dumont a5ebfd3e2a vector (std::__debug::vector<>::clear()): Do not reset guaranteed capacity.
2014-12-20  François Dumont  <fdumont@gcc.gnu.org>

	* include/debug/vector (std::__debug::vector<>::clear()): Do not reset
	guaranteed capacity.
	* testsuite/23_containers/vector/bool/allocator/swap.cc: Move
	propagating_allocator equality and inequality operators to __gnu_test
	namespace.

From-SVN: r218991
2014-12-20 19:16:03 +00:00
François Dumont aa1986fac1 mutex_extensions_neg.cc: Adjust dg-error.
2014-12-20  François Dumont  <fdumont@gcc.gnu.org>

	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error.

From-SVN: r218990
2014-12-20 16:09:45 +00:00
François Dumont 9836f82e7a c++config: inline __cxx11 namespace within namespace __cxx1998.
2014-12-20  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/c++config: inline __cxx11 namespace within namespace
	__cxx1998.

From-SVN: r218988
2014-12-20 08:37:02 +00:00
Jonathan Wakely 189486b858 Fix duplicate symbol errors in Darwin bootstrap.
* src/c++98/locale-inst.cc (__add_grouping, __pad, __int_to_char):
	Only compile for old ABI.

From-SVN: r218984
2014-12-20 00:19:40 +00:00
Jonathan Wakely 34a2b7558b New std::string implementation.
* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_CXX11_ABI): Remove.
	(GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI, GLIBCXX_DEFAULT_ABI): Add.
	* configure.ac: Use new macros.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
	* include/Makefile.am: Set _GLIBCXX_USE_DUAL_ABI.
	* include/Makefile.in: Regenerate.
	* config/abi/pre/gnu.ver: Export symbols related to new std::string.
	Tighten old patterns to not match new symbols.
	* config/locale/generic/monetary_members.cc: Guard some definitions
	to not compile with new ABI.
	* config/locale/gnu/monetary_members.cc: Likewise.
	* config/locale/gnu/numeric_members.cc: Prevent double-free.
	* config/os/gnu-linux/ldbl-extra.ver: Add new __gnu_cxx_ldbl128
	exports. Tighten old patterns.
	* doc/xml/manual/configure.xml: Document new configure options.
	* doc/html/*: Regenerate.
	* include/bits/basic_string.h (__cxx11::basic_string): Define new
	non-reference-counted implementation in inline namespace __cxx11.
	(stoi, stol, stoll, stof, stod, stold, to_string): Conditionally use
	inline namespace.
	(literals::string_literals::operator"): Conditionally use abi-tag.
	* include/bits/basic_string.tcc (__cxx11::basic_string): Define.
	* include/bits/c++config: Define _GLIBCXX_USE_DUAL_ABI and
	LDBL_CXX11_ABI namespace macros.
	* include/bits/locale_classes.h (locale::name()): Use abi_tag when
	new ABI is in use.
	(locale::_S_twinned_facets): New static member.
	(locale::facet::__shim): Declare new type.
	(locale::_facet::_M_sso_shim, locale::_facet::_M_cow_shim): New
	functions for creating shims.
	(locale::_Impl::_M_facet_unchecked): New member function for use
	during construction.
	(locale::_Impl::_M_init_extra): New member functions to create second
	version of some facets.
	(collate, collate_byname): Use abi_tag when new ABI is in use.
	* include/bits/locale_facets.h: Add _GLIBCXX_NUM_CXX11_FACETS macro.
	(numpunct, numpunct_byname): Use __cxx11 namespace.
	(num_get::_M_extract_float, num_get::_M_extract_int): Use abi_tag
	when new ABI is in use.
	(num_get::__do_get, num_put::__do_put): Do not declare long double
	compat functions for new ABI.
	* include/bits/locale_facets.tcc (num_get, num_put): Use abi_tag on
	definitions.
	(numpunct, numpunct_byname): Qualify explicit instantiations.
	* include/bits/locale_facets_nonio.h (time_get, time_get_byname,
	moneypunct, moneypunct_byname, money_get, money_put, messages,
	messages_byname): Use new inline namespace macros.
	(money_get::__do_get, money_put::__do_put): Do not declare long
	double compat functions for new ABI.
	* include/bits/locale_facets_nonio.tcc (money_get, money_put): Use
	new namespace macros.
	(money_get::__do_get, money_put::__do_put): Do not define for new ABI.
	* include/bits/localefwd.h (numpunct, numpunct_byname, collate,
	collate_byname, time_get, time_get_byname, moneypunct,
	moneypunct_byname, money_get, money_put, messages, messages_byname):
	Use new namespace macros.
	* include/bits/regex.h: Use inline namespace macros.
	* include/bits/stl_list.h (_List_base, list): Use inline namespace
	instead of abi-tag.
	* include/bits/stringfwd.h (basic_string): Use namespace macros.
	* include/std/iosfwd (basic_stringbuf, basic_istringstream,
	basic_ostringstream, basic_stringstream): Likewise.
	* include/std/sstream: Likewise.
	(basic_stringbuf::__xfer_bufptrs): Update streambuf pointers on move.
	* include/std/stdexcept (__cow_string, __sso_string): New types for
	indirectly using std::string with either ABI.
	(logic_error, runtime_error): Replace std::string member with
	__cow_string when new ABI is in use. Declare non-inline copy
	constructor and assignment operator. Declare const char* constructors.
	(domain_error, invalid_argument, length_error, out_of_range,
	range_error, overflow_error, underflow_error): Declare const char*
	constructors.
	* include/std/system_error (error_category): Replace with new
	definition in inline namespace _V2.
	(error_code::message, error_condition::message): Use abi_tag on
	functions returning std::string.
	* python/libstdcxx/v6/printers.py (StdStringPrinter): Handle new ABI.
	* src/c++11/Makefile.am: Add new files.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++11/compatibility-c++0x.cc: Compile with old std::string ABI.
	Define old error_category symbols.
	* src/c++11/cow-fstream-inst.cc: New. Instantiate fstream members
	using old std::string ABI.
	* src/c++11/cow-locale_init.cc (locale::_Impl::_M_init_extra): Define.
	* src/c++11/cow-shim_facets.cc: Define shim facets using old ABI.
	* src/c++11/cow-sstream-inst.cc: Instantiate stringstreams using old
	std::string ABI.
	* src/c++11/cow-stdexcept.cc: Define new constructors and assignment
	operators.
	(__cow_string, error_category::_M_message): Define.
	* src/c++11/cow-string-inst.cc: Explicit instantiations using old
	std::string. Include src/c++98/istream-string.cc.
	* src/c++11/cow-wstring-inst.cc: Explicit instantiations using old
	std::wstring.
	* src/c++11/cxx11-hash_tr1.cc: Explicit instantiations using new
	string.
	* src/c++11/cxx11-ios_failure.cc: Add sanity check.
	* src/c++11/cxx11-locale-inst.cc: Instantiate facets using new
	std::string.
	* src/c++11/cxx11-shim_facets.cc: Define shim facets using new ABI.
	* src/c++11/cxx11-stdexcept.cc: Define constructors taking new
	std::string.
	* src/c++11/cxx11-wlocale-inst.cc: Instantiate facets using
	new std::wstring.
	* src/c++11/fstream-inst.cc: Compile with new ABI.
	* src/c++11/functexcept.cc: Compile with old ABI.
	* src/c++11/random.cc: Compile with new ABI.
	* src/c++11/sstream-inst.cc: Compile with new ABI.
	* src/c++11/string-inst.cc: Explicit instantiations for new string.
	* src/c++11/system_error.cc (__sso_string, error_category::_M_message):
	Define.
	* src/c++11/wstring-inst.cc: Compile with new ABI.
	* src/c++98/Makefile.am: Compile some host files twice for old and
	new std::string. Add new files.
	* src/c++98/Makefile.in: Regenerate.
	* src/c++98/compatibility-ldbl.cc: Compile with old ABI.
	* src/c++98/compatibility.cc: Likewise.
	* src/c++98/concept-inst.cc: Likewise.
	* src/c++98/hash_tr1.cc: Likewise.
	* src/c++98/istream-string.cc: New file defining functions that
	work with istream and std::string moved from ...
	* src/c++98/istream.cc: ... here.
	* src/c++98/cow-istream-string.cc: Recompile istream-string.cc with
	old ABI.
	* src/c++98/locale-inst.cc: Adjust facet instantiations to work for
	either ABI.
	* src/c++98/locale.cc (locale::_M_install_facet,
	locale::_M_install_cache): Handle twinned facets.
	* src/c++98/locale-facets.cc: Compile with old std::string ABI.
	(__verify_grouping): Define new overload and old std::string version.
	* src/c++98/locale_init.cc: Initialize twinned facets.
	* src/c++98/localename.cc: Likewise.
	* src/c++98/misc-inst.cc: Instantiate C++98-only std::string members.
	(__verify_grouping): Define new std::string version.
	* src/c++98/stdexcept.cc: Compile with old std::string ABI.
	* src/c++98/wlocale-inst.cc: Likewise.
	* testsuite/18_support/50594.cc: Adjust to work with SSO strings.
	* testsuite/21_strings/basic_string/capacity/1.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
	Likewise.
	* testsuite/21_strings/headers/string/synopsis.cc: Use inline
	namespace macros.
	* testsuite/23_containers/headers/list/synopsis.cc: Likewise.
	* testsuite/27_io/basic_ios/copyfmt/char/1.cc: Set dg-options so
	correct exception type 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.
	* testsuite/27_io/ios_base/failure/cxx11.cc: Disable for old ABI.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error.
	* testsuite/libstdc++-prettyprinters/libfundts.cc: Use old ABI.
	* testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
	* testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
	* testsuite/util/exception/safety.h: Adjust member function types
	for new std::string.
	* testsuite/util/testsuite_abi.cc: Add new version and ignore
	__float128 symbols in __cxx11 namespace.

From-SVN: r218964
2014-12-19 18:16:39 +00:00
Tim Shen e16a69a8f2 re PR libstdc++/64302 (The match_results::cbegin()/cend() return incorrect results)
PR libstdc++/64302
	PR libstdc++/64303
	* include/bits/regex.h (match_results::cbegin, match_results::cend,
	regex_token_iterator::regex_token_iterator,
	regex_token_iterator::_M_normalize_result): Fix match_results cbegin
	and cend and regex_token_iterator::_M_result invariant.
	* include/bits/regex.tcc: Fix regex_token_iterator::_M_result invariant.
	* testsuite/28_regex/iterators/regex_token_iterator/64303.cc: Testcase.

From-SVN: r218810
2014-12-17 09:25:44 +00:00
Jakub Jelinek 7e2ac29ecb gnu.ver (CXXABI_1.3.9): Export not just _Zd[la]Pvm...
* config/abi/pre/gnu.ver (CXXABI_1.3.9): Export not just
	_Zd[la]Pvm, but also _Zd[la]Pv[jy] to cover other std::size_t
	manglings.

From-SVN: r218785
2014-12-16 18:42:24 +01:00
Jason Merrill 47830a4d38 gnu-versioned-namespace.ver: And other size_t manglings.
* config/abi/pre/gnu-versioned-namespace.ver: And other size_t
	manglings.

From-SVN: r218784
2014-12-16 12:21:42 -05:00
Jason Merrill 4244b840bd gnu-versioned-namespace.ver: Export _ZdlPvm and _ZdaPvm.
* config/abi/pre/gnu-versioned-namespace.ver: Export _ZdlPvm and
	_ZdaPvm.

From-SVN: r218781
2014-12-16 10:48:58 -05:00
Jason Merrill 20b06addf9 N3778: Sized Deallocation
N3778: Sized Deallocation
gcc/c-family/
	* c.opt (-fsized-deallocation, -Wc++14-compat): New.
	(-Wsized-deallocation): New.
	* c-opts.c (c_common_post_options): -fsized-deallocation defaults
	to on in C++14 and up.
gcc/cp/
	* call.c (non_placement_deallocation_fn_p): A global sized
	operator delete is not a usual deallocation function until C++14.
	(build_op_delete_call): Choose the global sized op delete if we
	know the size.
	* cp-tree.h: Declare non_placement_deallocation_fn_p.
	(enum cp_tree_index): Remove CPTI_GLOBAL_DELETE_FNDECL.
	(global_delete_fndecl): Remove.
	* decl.c (cxx_init_decl_processing): Also declare sized op deletes.
	(grok_op_properties): Warn about sized dealloc without the flag.
	* init.c (build_builtin_delete_call): Remove.
	(build_vec_delete_1, build_delete): Don't call it.
	* decl2.c (maybe_warn_sized_delete): New.
	(cp_write_global_declarations): Call it.
libstdc++-v3/
	* libsupc++/del_ops.cc: New.
	* libsupc++/del_opvs.cc: New.
	* libsupc++/Makefile.am: Add them.
	* libsupc++/Makefile.in: Regenerate.
	* config/abi/pre/gnu.ver: Export _ZdlPvm and _ZdaPvm.

From-SVN: r218755
2014-12-15 13:31:40 -05:00
Tim Shen bc2738455b re PR libstdc++/64239 (regex_iterator::operator= should copy match_results::position)
PR libstdc++/64239
	* include/bits/regex.h (match_results<>::match_results,
	match_results<>::operator=, match_results<>::position,
	match_results<>::swap): Remove match_results::_M_in_iterator.
	Fix ctor/assign/swap.
	* include/bits/regex.tcc: (__regex_algo_impl<>,
	regex_iterator<>::operator++): Set match_results::_M_begin as
	"start position".
	* testsuite/28_regex/iterators/regex_iterator/char/
	string_position_01.cc: Test cases.

From-SVN: r218710
2014-12-13 22:19:18 +00:00
Jonathan Wakely 6554581713 Post-Urbana updates to Library Fundamentals v1.
* include/experimental/any (any): Remove allocator support and update
	feature-testing macro.
	* include/experimental/functional: Update feature-testing macro.
	* include/experimental/optional (optional::_M_get()): Add constexpr.
	(optional::operator*(), optional::value()): Overload and add
	ref-qualifiers. Update feature-testing macro.
	* include/experimental/string_view (basic_string_view::clear): Remove
	and update feature-testing macro.
	* testsuite/experimental/any/cons/3.cc: Remove.
	* testsuite/experimental/any/cons/4.cc: Remove.
	* testsuite/experimental/any/misc/any_cast.cc: Remove allocator tests.
	* testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
	* testsuite/experimental/string_view/capacity/1.cc: Don't test clear().

From-SVN: r218709
2014-12-13 20:44:06 +00:00
Jonathan Wakely 93889749df re PR libstdc++/58594 (std::make_shared does not accept const types as parameters)
PR libstdc++/58594
	* include/bits/shared_ptr_base.h: Real fix for cv-qualified types.

From-SVN: r218698
2014-12-13 00:44:17 +00:00
Jonathan Wakely d95521b411 re PR libstdc++/58594 (std::make_shared does not accept const types as parameters)
PR libstdc++/58594
	* include/bits/shared_ptr_base.h: Cast away cv-quals.
	* testsuite/20_util/shared_ptr/creation/58594-no-rtti.cc: New.
	* testsuite/20_util/shared_ptr/creation/private.cc: Make allocator
	rebindable so test passes with -fno-rtti.

From-SVN: r218691
2014-12-12 21:05:35 +00:00
Jonathan Wakely 0f3d27f01a re PR libstdc++/64276 (would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available)
PR libstdc++/64276
	* doc/doxygen/user.cfg.in: Define __cpp_exceptions and __cpp_rtti.
	* doc/html/manual/using_exceptions.html: Regenerate.
	* doc/xml/manual/using_exceptions.xml: Use SD-6 feature-testing
	macros, __cpp_exceptions and __cpp_rtti, instead of __EXCEPTIONS and
	__GXX_RTTI.
	* include/bits/c++config: Likewise.
	* include/bits/locale_classes.tcc: Likewise.
	* include/bits/shared_ptr.h: Likewise.
	* include/bits/shared_ptr_base.h: Likewise.
	* include/debug/formatter.h: Likewise.
	* include/experimental/any: Likewise.
	* include/ext/rope: Likewise.
	* include/ext/ropeimpl.h: Likewise.
	* include/std/functional: Likewise.
	* include/tr1/functional: Likewise.
	* include/tr1/shared_ptr.h: Likewise.
	* libsupc++/eh_call.cc: Likewise.
	* libsupc++/eh_personality.cc: Likewise.
	* libsupc++/exception_defines.h: Likewise.
	* libsupc++/exception_ptr.h: Likewise.
	* libsupc++/guard.cc: Likewise.
	* libsupc++/pbase_type_info.cc: Likewise.
	* libsupc++/pointer_type_info.cc: Likewise.
	* libsupc++/vterminate.cc: Likewise.
	* src/c++11/thread.cc: Likewise.

From-SVN: r218679
2014-12-12 15:58:49 +00:00
Jonathan Wakely 8f596ff51a re PR libstdc++/64241 (make_exception_ptr returns garbage with -fno-exceptions)
PR libstdc++/64241
	* libsupc++/exception_ptr.h: Return empty object when exceptions are
	disabled.
	* testsuite/18_support/exception_ptr/64241.cc: New.

From-SVN: r218675
2014-12-12 15:10:08 +00:00
Jonathan Wakely db62401dee stl_iterator.h (make_reverse_iterator): LWG DR 2285.
* include/bits/stl_iterator.h (make_reverse_iterator): LWG DR 2285.
	* include/std/tuple: Add feature-test macro.
	* testsuite/24_iterators/reverse_iterator/make.cc: New.

From-SVN: r218670
2014-12-12 13:35:55 +00:00
Kyrylo Tkachov c71c975fe6 [libstdc++][testsuite] Mark as UNSUPPORTED tests that don't fit into tiny memory model
* testsuite/lib/libstdc++.exp: Include target-utils.exp.
	(v3_target_compile): Check if test is unsupported.
	(v3_target_compile_as_c): Likewise.

From-SVN: r218661
2014-12-12 09:36:35 +00:00
Jason Merrill 94a073b251 Remove N3639 "array of runtime length" from -std=c++14.
gcc/cp/
	* decl.c (compute_array_index_type): VLAs are not part of C++14.
	(create_array_type_for_decl, grokdeclarator): Likewise.
	* lambda.c (add_capture): Likewise.
	* pt.c (tsubst): Likewise.
	* rtti.c (get_tinfo_decl): Likewise.
	* semantics.c (finish_decltype_type): Likewise.
	* typeck.c (cxx_sizeof_or_alignof_type): Likewise.
	(cp_build_addr_expr_1): Likewise.
	* init.c (build_vec_init): Don't throw bad_array_length.
gcc/c-family/
	* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
	we aren't complaining about VLAs.
libstdc++-v3/
	* libsupc++/new (bad_array_length): Move...
	* bad_array_length.cc: ...here.
	* cxxabi.h, eh_aux_runtime.cc (__cxa_throw_bad_array_new_length): Also
	move to bad_array_length.cc.

	* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
	we aren't complaining about VLAs.

From-SVN: r218655
2014-12-11 22:49:13 -05:00
Jonathan Wakely b8c555ac7c 3.cc: Only use a thread_local when __cxa_thread_atexit_impl is available.
* testsuite/30_threads/condition_variable/members/3.cc: Only use
	a thread_local when __cxa_thread_atexit_impl is available.

From-SVN: r218638
2014-12-11 17:58:22 +00:00
Jonathan Wakely 6789ccfa46 Implement LWG DR 2329 and DR 2332.
* include/bits/regex.h (regex_match, regex_search): LWG DR 2329,
	add deleted overloads for rvalue strings.
	(regex_iterator, regex_token_iterator): LWG DR 2332, add deleted
	constructors for rvalue regexes.
	* testsuite/28_regex/algorithms/regex_match/dr2329_neg.cc: New.
	* testsuite/28_regex/algorithms/regex_search/dr2329_neg.cc: New.
	* testsuite/28_regex/iterators/regex_iterator/ctors/char/dr2332_neg.cc:
	New.
	* testsuite/28_regex/iterators/regex_token_iterator/ctors/char/
	dr2332_neg.cc: New.

From-SVN: r218555
2014-12-10 01:37:37 +00:00
Jonathan Wakely 9131b50960 future (__future_base::_Setter::operator(), [...]): Make call operators const.
* include/std/future (__future_base::_Setter::operator(),
	__future_base::_Task_setter::operator()): Make call operators const.

From-SVN: r218553
2014-12-10 00:39:37 +00:00
Jonathan Wakely d6f64424aa locale_facets.tcc (numpunct::_M_cache): Avoid calling virtual functions twice.
* include/bits/locale_facets.tcc (numpunct::_M_cache): Avoid calling
	virtual functions twice. Only update _M_allocated after all
	allocations have succeeded.
	* include/bits/locale_facets_nonio.tcc (moneypunct::_M_cache):
	Likewise.
	* include/bits/locale_facets_nonio.h (__timepunct::_M_cache): Remove
	unused declaration.

From-SVN: r218552
2014-12-10 00:21:37 +00:00
Jonathan Wakely 60b6534a84 re PR libstdc++/64203 (shared_mutex compile errors on bare-metal targets)
PR libstdc++/64203
	* include/std/shared_mutex: Fix preprocessor conditions.
	* testsuite/experimental/feat-cxx14.cc: Check conditions.

From-SVN: r218511
2014-12-09 11:03:57 +00:00
Tim Shen 00d6d5b1e7 Fix ChangeLog format.
From-SVN: r218444
2014-12-06 11:31:12 +00:00
Jonathan Wakely 612b47110a hashtable_policy.h (_Map_base::operator[], [...]): Simplify definitions with trailing return types.
* include/bits/hashtable_policy.h (_Map_base::operator[],
	_Map_base::at): Simplify definitions with trailing return types.

From-SVN: r218416
2014-12-05 10:35:51 +00:00
Tim Shen 9b9c2a974a re PR libstdc++/64140 (match_results.prefix() returns an incorrect result if regex_iterator holds a zero-length match)
PR libstdc++/64140
	* include/bits/regex.tcc (regex_iterator<>::operator++): Update
	prefix.matched after modifying prefix.first.
	* testsuite/28_regex/iterators/regex_iterator/char/64140.cc: New
	testcase.

From-SVN: r218340
2014-12-04 04:25:12 +00:00
François Dumont d31008d7a0 re PR libstdc++/13631 (Problems in messages)
2014-12-03  François Dumont  <fdumont@gcc.gnu.org>

	PR libstdc++/13631
	* include/bits/codecvt.h (codecvt<char, char, mbstate_t>): friend class
	std::messages<char>.
	(codecvt<wchar_t, char, mbstate_t>): friend class
	std::messages<wchar_t>.
	* config/locale/gnu/messages_member.h
	(messages<char>::do_open): Specialized.
	(messages<char>::do_close): Likewise.
	(messages<wchar_t>::do_open): Likewise.
	(messages<wchar_t>::do_close): Likewise.
	* config/locale/gnu/messages_member.cc:
	(messages<char>::do_open): Implement. Use bind_textdomain_codeset based
	on codecvt<char, char, mbstate_t>._M_c_locale_codecvt code set. Use
	internal cache to keep opened domain name with locale information.
	(messages<wchar_t>::do_open): Likewise with
	codecvt<wchar_t, char, mbstate_t>.
	(messages<char>::do_close): Implement. Clean cache information.
	(messages<wchar_t>::do_close): Likewise.
	(get_glibc_msg): New. Use dgettext rather than gettext using cached
	domain name associated to catalog id.
	(messages<char>::do_get): Use latter.
	(messages<wchar_t>::do_get): Likewise and use also cached locale
	codecvt<wchar_t, char, mbstate_t> facet to convert wchar_t default
	value to char and the result back to wchar_t.
	* testsuite/22_locale/messages/13631.cc: New.
	* testsuite/22_locale/messages/members/char/2.cc: Use also fr_FR locale
	for charset conversion to get the expected accented character.

From-SVN: r218329
2014-12-03 19:47:00 +00:00
Marek Polacek 028c9c9ed7 regex_compiler.h (_S_cache_size): Multiply the RHS of the shift-expression by _UseCache::value.
* include/bits/regex_compiler.h (_S_cache_size): Multiply the
	RHS of the shift-expression by _UseCache::value.

From-SVN: r218322
2014-12-03 16:16:33 +00:00
Jonathan Wakely 103265d611 re PR libstdc++/64168 (FAIL: 30_threads/async/sync.cc execution test)
PR libstdc++/64168
	* include/std/future (_Deferred_state::_M_has_deferred): Fix return.

From-SVN: r218321
2014-12-03 16:09:21 +00:00
Jonathan Wakely db97b3b018 hashtable.h: Fix whitespace and simplify function definitions with trailing return types.
* include/bits/hashtable.h: Fix whitespace and simplify function
	definitions with trailing return types.

From-SVN: r218309
2014-12-03 12:00:02 +00:00
Jonathan Wakely 28fe2ab37c re PR libstdc++/64161 (bootstrap error: condition_variable.cc:134:7: error: 'atexit' is not a member of 'std')
PR libstdc++/64161
	* src/c++11/condition_variable.cc: Include <cstdlib>.

From-SVN: r218300
2014-12-03 01:34:03 +00:00
Jonathan Wakely e3376050fc status_cxx2011.xml: Update.
* doc/xml/manual/status_cxx2011.xml: Update.
	* doc/xml/manual/status_cxx2014.xml: Update.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r218270
2014-12-02 13:26:18 +00:00
Jonathan Wakely 9db7c9316e Define *_at_thread_exit() functions.
* config/abi/pre/gnu.ver: Add new exports.
	* include/std/condition_variable (notify_all_at_thread_exit): Declare.
	(__at_thread_exit_elt): New base class.
	* include/std/future: Add comments documenting the implementation.
	(__future_base::_State_baseV2::_State_baseV2()): Use brace-or-equal
	initializers and define constructor as defaulted.
	(__future_base::_State_baseV2::_M_ready): Replace member function
	with member variable.
	(__future_base::_State_baseV2::_M_set_result): Set _M_ready.
	(__future_base::_State_baseV2::_M_set_delayed_result): Define.
	(__future_base::_State_baseV2::_M_break_promise): Set _M_ready.
	(__future_base::_State_baseV2::_Make_ready): New helper class.
	(__future_base::_Deferred_state::_M_has_deferred): Remove requirement
	for caller to own mutex.
	(__future_base::_Async_state_impl::~_Async_state_impl): Call join
	directly.
	(__future_base::_Task_state_base::_M_run): Take arguments by
	reference.
	(__future_base::_Task_state_base::_M_run_delayed): Declare new pure
	virtual function.
	(__future_base::_Task_state::_M_run_delayed): Define override.
	(promise::set_value_at_thread_exit): Define.
	(promise::set_exception_at_thread_exit): Define.
	(packaged_task::make_ready_at_thread_exit): Define.
	* src/c++11/condition_variable.cc (notify_all_at_thread_exit): Define.
	* src/c++11/future.cc
	(__future_base::_State_baseV2::_Make_ready::_M_set): Define.
	* testsuite/30_threads/condition_variable/members/3.cc: New.
	* testsuite/30_threads/packaged_task/members/at_thread_exit.cc: New.
	* testsuite/30_threads/promise/members/at_thread_exit.cc: New.

From-SVN: r218255
2014-12-02 01:51:25 +00:00
Jonathan Wakely 7b55fa54d4 re PR libstdc++/63840 (std::function copy constructor deletes an uninitialized pointer if new fails)
PR libstdc++/63840
	* include/std/functional (function::function(const function&)): Set
	_M_manager after operations that might throw.
	* include/tr1/functional (function::function(const function&),
	function::function(_Functor, _Useless)): Likewise.
	* testsuite/20_util/function/63840.cc: New.
	* testsuite/tr1/3_function_objects/function/63840.cc: New.

From-SVN: r218215
2014-12-01 13:49:20 +00:00
Jonathan Wakely 565aed1a1e * config/abi/pre/gnu.ver: Fix ios_base::failure exports.
From-SVN: r218189
2014-11-30 12:51:42 +00:00
Jonathan Wakely 38dbb2a53f locale_init.cc (locale::_Impl::_Impl(size_t)): Use new-initializer instead of loop.
* src/c++98/locale_init.cc (locale::_Impl::_Impl(size_t)): Use
	new-initializer instead of loop.
	* src/c++98/localename.cc (locale::_Impl::_Impl(const char*, size_t)):
	Likewise.

From-SVN: r218184
2014-11-29 22:58:38 +00:00
Jonathan Wakely bd6757b8d3 nonio.h (__timepunct): Remove unused typedef.
* include/bits/locale_facets/nonio.h (__timepunct): Remove unused
	typedef.
	(time_get): Likewise. Fix comments.

From-SVN: r218183
2014-11-29 22:58:33 +00:00
Jonathan Wakely 77262e4212 XFAIL 27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc on Solaris (PR libstd++/64054)
PR libstdc++/64054
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
	XFAIL execution on *-*-solaris*.

Co-Authored-By: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>

From-SVN: r218081
2014-11-26 13:22:27 +00:00
Tom de Vries 6a848e9de1 Ensure single 'UNSUPPORTED: prettyprinters.exp' message
2014-11-25  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libstdc++-prettyprinters/prettyprinters.exp: Add missing
	dg-finish.  Only print unsupported message once.

From-SVN: r218060
2014-11-25 20:30:20 +00:00
Tim Shen 02ba3fc22d re PR libstdc++/63920 (Any regular expression should not match an empty sequence if match_not_null is specified)
PR libstdc++/63920
	* include/bits/regex_executor.h: Make _M_begin non const.
	* include/bits/regex_executor.tcc (_Executor<>::_M_search): Increase
	_M_begin in search algorithm, so that _M_begin is treated as
	"current start position" for each search iteration.
	* testsuite/28_regex/algorithms/regex_search/ecma/flags.cc: New
	testcase.

From-SVN: r218037
2014-11-25 05:43:04 +00:00
H.J. Lu a699d67255 Always use PIC option with -shared in libtool
Libtool needs to pass PIC option -shared when creating shared object to
link regular object files with slim-lto archive.

	PR bootstrap/63784
	* libtool.m4: Add $pic_flag with -shared.

boehm-gc/

	PR bootstrap/63784
	* configure: Regenerated.

gcc/

	PR bootstrap/63784
	* configure: Regenerated.

libatomic/

	PR bootstrap/63784
	* configure: Regenerated.

libbacktrace/

	PR bootstrap/63784
	* configure: Regenerated.

libcc1/

	PR bootstrap/63784
	* configure: Regenerated.

libcilkrts/

	PR bootstrap/63784
	* configure: Regenerated.

libffi/

	PR bootstrap/63784
	* configure: Regenerated.

libgfortran/

	PR bootstrap/63784
	* configure: Regenerated.

libgomp/

	PR bootstrap/63784
	* configure: Regenerated.

libitm/

	PR bootstrap/63784
	* configure: Regenerated.

libjava/

	PR bootstrap/63784
	* configure: Regenerated.

libjava/classpath/

	PR bootstrap/63784
	* configure: Regenerated.

libobjc/

	PR bootstrap/63784
	* configure: Regenerated.

libquadmath/

	PR bootstrap/63784
	* configure: Regenerated.

libsanitizer/

	PR bootstrap/63784
	* configure: Regenerated.

libssp/

	PR bootstrap/63784
	* configure: Regenerated.

libstdc++-v3/

	PR bootstrap/63784
	* configure: Regenerated.

libvtv/

	PR bootstrap/63784
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/63784
	* configure: Regenerated.

From-SVN: r217937
2014-11-21 08:49:17 -08:00
Marc Glisse bb59f396f8 re PR libstdc++/43622 (Incomplete C++ library support for __float128)
2014-11-18  Marc Glisse  <marc.glisse@inria.fr>

	PR libstdc++/43622
gcc/cp/
	* rtti.c (emit_support_tinfos): Handle __float128.
libstdc++-v3/
	* config/abi/pre/float128.ver: New file.
	* configure.ac: Use float128.ver when relevant.
	* configure: Regenerate.
	* testsuite/util/testsuite_abi.cc (check_version): Accept new
	CXXABI_FLOAT128 version.

From-SVN: r217735
2014-11-18 20:20:53 +00:00
Jason Merrill 5f7282e2cb re PR c++/33911 (attribute deprecated vs. templates)
PR c++/33911
gcc/cp/
	* call.c (build_call_a): Don't warn_deprecated_use here.
	(build_over_call): Or here.
	* decl2.c (mark_used): Do it here.
	(is_late_template_attribute): Attribute deprecated is not deferred.
	(cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
	* parser.c (cp_parser_template_name): Warn about deprecated template.
	(cp_parser_template_argument): Likewise.
libstdc++-v3/
	* include/backward/binders.h: Suppress -Wdeprecated-declarations.
	* include/ext/array_allocator.h: Likewise.

From-SVN: r217677
2014-11-17 17:09:27 -05:00
Joel Sherrill 2c59c2d1a2 mt_allocator.cc: Fix assumption that sizeof(void *) is equal to sizeof(size_t).
2014-11-14  Joel Sherrill <joel.sherrill@oarcorp.com>

	* src/c++98/mt_allocator.cc: Fix assumption that sizeof(void *) is
	equal to sizeof(size_t). The m32c breaks this assumption.

From-SVN: r217576
2014-11-14 16:57:20 +00:00
Jonathan Wakely a5dde6ddac Define C++11 version of std::ios_base::failure.
* config/abi/pre/gnu.ver: Add new exports.
	* include/bits/ios_base.h (ios_base::failure): New definition using
	abi_tag.
	(io_errc, make_error_code, make_error_category, iostream_category):
	Define.
	* include/std/system_error (system_error): Add char* constructors.
	* src/c++11/Makefile.am: Add new file.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++11/cxx11-ios_failure.cc: New file.
	* src/c++98/ios_failure.cc: Compile old definition without abi_tag.
	* testsuite/27_io/ios_base/failure/cxx11.cc: New.
	* testsuite/27_io/ios_base/failure/what-1.cc: Allow string returned by
	ios_base::failure::what() to contain additional data.
	* testsuite/27_io/ios_base/failure/what-2.cc: Likewise..
	* testsuite/27_io/ios_base/failure/what-3.cc: Likewise..
	* testsuite/27_io/ios_base/failure/what-big.cc: Likewise..

From-SVN: r217559
2014-11-14 12:17:57 +00:00
Daniel Kruegler b82e9b016f regex.h: Support embedded zeros in sub_match comparisons (DR 2217)
2014-11-13  Daniel Kruegler  <daniel.kruegler@gmail.com>

	* include/bits/regex.h: Support embedded zeros in sub_match
	comparisons (DR 2217)
	* testsuite/28_regex/sub_match/embedded_zeros_cmp.cc:
	Add test cases for embedded zeros

From-SVN: r217535
2014-11-14 04:23:06 +00:00
Tim Shen 79b576cc38 re PR libstdc++/63775 ([C++11] Regex range with leading dash (-) not working)
PR libstdc++/63775
	* include/bits/regex_compiler.h (_Compiler<>::_M_expression_term,
	_BracketMatcher<>::_M_make_range): Throw regex_erorr on invalid range
	like [z-a]. Change _M_expression_term interface.
	* include/bits/regex_compiler.tcc (
	_Compiler<>::_M_insert_bracket_matcher,
	_Compiler<>::_M_expression_term): Rewrite bracket expression parsing.
	* testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc:
	Add testcases and move file out of extended.

From-SVN: r217461
2014-11-13 07:40:01 +00:00
Jonathan Wakely be8de8946e std::shared_ptr atomic operations
PR libstdc++/57250
	* config/abi/pre/gnu.ver: Export new symbols.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/bits/shared_ptr_atomic.h: Define atomic access functions.
	* include/std/memory: Include new header.
	* src/c++11/shared_ptr.cc (_Sp_locker): Define and use mutex pool.
	* testsuite/20_util/shared_ptr/atomic/1.cc: New.
	* testsuite/20_util/shared_ptr/atomic/2.cc: New.
	* testsuite/20_util/shared_ptr/atomic/3.cc: New.

From-SVN: r217452
2014-11-12 23:55:11 +00:00
Jonathan Wakely d8af84e67b Implement resolutions of LWG 2399, 2400 and 2401.
* include/bits/shared_ptr.h (shared_ptr, weak_ptr): Define
	_Convertible alias template to simplify constraints.
	(shared_ptr(unique_ptr<TD>&&)): Constrain (LWG 2399).
	* include/bits/shared_ptr_base.h: Likewise.
	(_Sp_counted_deleter::_M_get_deleter()): Use addressof (LWG 2400).
	* include/std/functional (function::operator=(nullptr_t)): Add
	noexcept (LWG 2401).
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error.
	* testsuite/20_util/shared_ptr/cons/void_neg.cc: Adjust dg-error.

From-SVN: r217442
2014-11-12 19:41:36 +00:00
Jonathan Wakely f871d7f9f4 LWG DR 2315. weak_ptr should be movable
* include/bits/shared_ptr.h (weak_ptr): Add move constructor and
	assignment.
	* include/bits/shared_ptr_base.h (__weak_count, __weak_ptr): Likewise.
	Use nullptr and injected class name.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error.
	* testsuite/20_util/shared_ptr/cons/void_neg.cc: Adjust dg-error.

From-SVN: r217413
2014-11-12 11:54:08 +00:00
Jonathan Wakely 098c88fb10 Add -Wno-deprecated to dg-options.
PR c++/33911
	* testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Use -Wno-deprecated.
	* testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/auto_ptr.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/auto_ptr_neg.cc: Likewise.
	* testsuite/ext/array_allocator/variadic_construct.cc: Likewise.

From-SVN: r217412
2014-11-12 10:32:17 +00:00
Jonathan Wakely 78366f5753 1.cc: Remove unused header.
* testsuite/experimental/optional/constexpr/observers/1.cc: Remove
	unused header.
	* testsuite/experimental/optional/constexpr/observers/2.cc: Likewise.
	* testsuite/experimental/optional/constexpr/observers/3.cc: Likewise.
	* testsuite/experimental/optional/constexpr/observers/4.cc: Likewise.
	* testsuite/experimental/optional/constexpr/observers/5.cc: Likewise.

From-SVN: r217401
2014-11-12 00:34:19 +00:00
Jonathan Wakely 72e58f18ae optional (_Has_addressof): Check for non-member operator&.
* include/experimental/optional (_Has_addressof): Check for non-member
	operator&.
	* testsuite/experimental/optional/observers/2.cc: Add operator&.
	* testsuite/experimental/optional/constexpr/observers/2.cc: Likewise.

From-SVN: r217397
2014-11-12 00:16:19 +00:00
Jonathan Wakely 847e9cf81e Define __void_t and SFINAE-friendly iterator_traits.
* include/std/type_traits (__void_t): Define new alias template.
	(_GLIBCXX_HAS_NESTED_TYPE): Redefine using __void_t.
	* include/std/functional (_Maybe_get_result_type): Likewise.
	* include/bits/stl_iterator_base_types.h (__iterator_traits): Likewise.
	* include/bits/uses_allocator.h (__uses_allocator_helper): Likewise.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error.
	* testsuite/20_util/reference_wrapper/typedefs-3.cc: Adjust to changes
	in _GLIBCXX_HAS_NESTED_TYPE.

From-SVN: r217395
2014-11-11 23:57:35 +00:00
Jonathan Wakely f6b640be24 Make std::mem_fn work with varargs functions.
* include/std/functional (_Mem_fn_traits): Add partial specializations
	for varargs functions.
	(_Mem_fn_base): Do not check arguments are convertible for varargs.
	(_Bind_check_arity): Add partial specializations for varargs functions.
	* include/std/type_traits (__bool_constant): Add alias template.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error.
	* testsuite/20_util/bind/refqual.cc: New, test ref-qualifiers.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error.
	* testsuite/20_util/function_objects/mem_fn/refqual.cc: Test varargs.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
	dg-error.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
	dg-error.

From-SVN: r217393
2014-11-11 23:38:34 +00:00
Siva Chandra Reddy 059e92fd1a associative-containers.cc: Add new file missed from earlier commit.
2014-11-11  Siva Chandra Reddy  <sivachandra@google.com>

	* testsuite/libstdc++-xmethods/associative-containers.cc: Add new
	file missed from earlier commit.

From-SVN: r217378
2014-11-11 22:10:21 +00:00
François Dumont 970a9caa49 re PR libstdc++/61107 (stl_algo.h: std::__inplace_stable_partition() doesn't process the whole data range)
2014-11-11  François Dumont  <fdumont@gcc.gnu.org>

	PR libstdc++/61107
	* include/bits/stl_algo.h (__inplace_stable_partition): Delete.
	(__stable_partition_adaptive): Return __first if range length is 1.
	(__stable_partition): Adapt.
	* testsuite/util/testsuite_new_operators.h: New.
	* testsuite/25_algorithms/stable_sort/1.cc: Test algo in simulated
	constraint memory context.
	* testsuite/25_algorithms/inplace_merge/1.cc: Likewise.
	* testsuite/25_algorithms/stable_partition/1.cc: Likewise.

From-SVN: r217370
2014-11-11 21:21:10 +00:00
Francois-Xavier Coudert ebf6d33b73 re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14))
toplevel:
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* libtool.m4: Fix globbing of darwin versions.

boehm-gc/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

gcc/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libatomic/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libbacktrace/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libcc1/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libcilkrts/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libffi/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libgfortran/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libgomp/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libitm/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libobjc/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libquadmath/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libsanitizer/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libssp/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libstdc++-v3/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libvtv/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

lto-plugin/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libjava/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libjava/classpath/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

zlib/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

From-SVN: r217366
2014-11-11 20:25:18 +00:00
Siva Chandra Reddy a5281f1796 xmethods.py: Add xmethods for associative containers.
2014-11-11  Siva Chandra Reddy  <sivachandra@google.com>

	* python/libstdcxx/v6/xmethods.py: Add xmethods for associative
	containers.
	* testsuite/libstdc++-xmethods/associative-containers.cc: New file.

From-SVN: r217344
2014-11-11 11:35:34 +00:00
Jonathan Wakely e9c51193ea re PR libstdc++/63811 (r217322 breaks bootstrap)
PR libstdc++/63811
	* include/bits/stl_deque.h (_Deque_base::_M_move_impl()): Avoid using
	badname.

From-SVN: r217343
2014-11-11 10:41:46 +00:00
Jonathan Wakely 2abd4ee6b5 Fix std::deque move construction with non-equal allocators.
* include/bits/stl_deque.h (_Deque_base::_Deque_base(_Deque_base&&)):
	Dispatch according to whether allocators are always equal.
	(_Deque_base::_M_move_impl()): Implement move-from state.
	* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Fix
	dg-error line number.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
	Likewise.

From-SVN: r217322
2014-11-10 22:44:07 +00:00
François Dumont b12db70880 Major maintenance patch of the profile mode.
2014-11-10  François Dumont  <fdumont@gcc.gnu.org>

	Major maintenance patch of the profile mode.
	* include/profile/impl/profiler_container_size.h
	(__container_size_info()): Delete.
	(__container_size_info(const __container_size_info&)): Delete.
	(virtual ~__container_size_info()): Delete.
	(__container_size_info(__stack_t, size_t)): Delete.
	(__container_size_info(__stack_t)): New.
	(__container_size_info::__init(size_t)): New.
	(__container_size_info::__merge): Call __object_info_base::__merge.
	(__trace_container_size::__construct): Delete declaration.
	(__trace_container_size::__insert): Return __container_size_info*,
	call __init.
	* include/profile/impl/profiler_hash_func.h
	(__hashfunc_into()): Delete.
	(__hashfunc_info(const __hashfunc_info&)): Delete.
	(virtual ~__hashfunc_info()): Delete.
	(__hashfunc_info::__merge): Call __object_info_base::__merge.
	(__trace_hash_func::__insert): Delete.
	(__trace_hash_func_free): New.
	(__trace_hash_func_report): Call __trace_report.
	(__trace_hash_func_construct): Return __hashfunc_info*. Add check for
	reentrancy.
	* include/profile/impl/profiler_hashtable_size.h
	(__trace_hashtable_size_free): New.
	(__trace_hashtable_size_report): Call __trace_report.
	(__trace_hashtable_size_construct): Return __container_size_info*. Add
	check for reentrancy.
	* include/profile/impl/profiler_list_to_slist.h
	(__list2slist_info()): Delete.
	(__list2slist_info(const __list2slist_info&)): Delete.
	(virtual ~__list2slist_info()): Delete.
	(__trace_list_to_slist::__merge(const __list2slist_info&)): Delete.
	(__trace_list_to_slist::__opr_rewind(const void*)): Delete.
	(__trace_list_to_slist::__record_operation(const void*)): Delete.
	(__trace_list_to_slist::__insert(const __object_t, __stack_t)): Delete.
	(__trace_list_to_slist::__destruct): Only call __retire_object.
	(__trace_list_to_slist_free()): New.
	(__trace_list_to_slist_report): Call __trace_report.
	(__trace_list_to_slist_construct): Return __list2slist_info*. Add check
	for reentrancy.
	* include/profile/impl/profiler_list_to_vector.h
	(__list2vector_info()): Delete.
	(__list2vector_info(const __list2vector_info&)): Delete.
	(virtual ~__list2vector_info()): Delete.
	(_list2vector_info::__is_valid): Delete.
	(_list2vector_info::__set_invalid): Delete.
	(_list2vector_info::__opr_iterate): Use atomic operation.
	(_list2vector_info::_M_valid): Delete.
	(__trace_list_to_vector::__insert): Delete.
	(__trace_list_to_vector::__find): Delete.
	(__trace_list_to_vector::__opr_insert): Delete.
	(__trace_list_to_vector::__opr_iterate): Delete.
	(__trace_list_to_vector::__invalid_operator): Delete.
	(__trace_list_to_vector::__resize): Delete.
	(__trace_list_to_vector_free): New.
	(__trace_list_to_vector_report): Call __trace_report.
	(__trace_list_to_vector_construct): Return __list2vector_info*. Add
	check for reentrancy.
	* include/profile/impl/profiler_map_to_unordered_map.h
	(__map2umap_info()): Delete.
	(__map2umap_info(const __map2umap_info&)): Delete.
	(virtual ~__map2umap_info()): Delete.
	(__map2umap_info::__record_iterate): Use atomic operation.
	(__map2umap_info::__set_iterate_costs): New.
	(__map2umap_info::__record_invalidate): Delete.
	(__map2umap_info::_M_valid): Delete.
	(__trace_map2umap::__destruct): New.
	(__trace_map_to_unordered_map_free): New.
	(__trace_map_to_unordered_map_report): Call __trace_report.
	(__trace_map_to_unordered_map_construct): Return __map2umap_info*. Add
	check for reentrancy.
	* include/profile/impl/profiler_node.h (__object_t): Delete typedef.
	(__get_stack): Return null stack trace in case of (bad_alloc) exception.
	(__object_info_base()): Delete.
	(__object_info_base(const __object_info_base&)): Delete.
	(virtual ~__object_info_base()): Delete.
	(__object_info_base::__set_invalid): New.
	(__object_info_base::__merge): New.
	(virtual void __write(FILE*)): Delete.
	(class __stack_info_base): Delete.
	* include/profile/impl/profiler_trace.h (__global_lock): Rename into
	__global_mutex.
	(__trace_vector_size_free): New declaration.
	(__trace_hashtable_size_free): Likewise.
	(__trace_hash_func_free): Likewise.
	(__trace_vector_to_list_free): Likewise.
	(__trace_list_to_slist_free): Likewise.
	(__trace_list_to_vector_free): Likewise.
	(__trace_map_to_unordered_map_free): Likewise.
	(__trace_base::~__trace_base()): Not virtual anymore. Delete stored
	backtrace information.
	(__trace_base::__add_object): Return __object_info*, take only a stack
	trace.
	(__trace_base::__get_object_info): Delete.
	(__trace_base::__retire_object): Take __object_info* instead of
	__object_t.
	(__trace_base::__object_table_lock): Delete.
	(__trace_base::__stack_table_lock): Delete.
	(__trace_base::__object_table_t): Delete typedef.
	(__trace_base::__object_table): Delete.
	(__trace_base::__trace_mutex): New.
	(__trace_base::__object_byte_size): New.
	(__trace_report): New.
	(__report): Use __gnu_cxx::__scoped_lock to lock/unlock __global_mutex
	rather than explicitely calling lock() method, exception safe.
	(__report_and_free): New. Call __report and free all profile mode
	resources.
	(__profcxx_init_unconditional): Use __scoped_lock. Register
	__report_and_free with atexit.
	* include/profile/impl/profiler_vector_size.h
	(__trace_vector_size_free): New.
	(__trace_vector_size_report): Call __trace_report.
	(__trace_vector_size_construct): Return __container_size_info*. Add
	check for reentrancy.
	* include/profile/impl/profiler_vector_to_list.h
	(__vector2list_info()): Delete.
	(virtual ~__vector2list_info()): Delete.
	(__vector2list_info(const __vector2list_info&)): Delete.
	(__vector2list_info::__merge): Call __object_info_base::__merge.
	(__vector2list_info::__is_valid): Delete.
	(__vector2list_info::__set_valid): Delete.
	(__vector2list_info::__opr_find): Delete.
	(__vector2list_info::_M_valid): Delete.
	(__trace_vector_to_list::__insert): Delete.
	(__trace_vector_to_list::__find): Delete.
	(__trace_vector_to_list::__opr_insert): Delete.
	(__trace_vector_to_list::__opr_iterate): Delete.
	(__trace_vector_to_list::__invalid_operator): Delete.
	(__trace_vector_to_list::__resize): Delete.
	(__trace_vector_to_list::__opr_find): Delete.
	(__trace_vector_to_list_free): New.
	(__trace_vector_to_list_report): Call __trace_report.
	(__trace_vector_to_list_construct): Return __vector2list_info*. Add
	check for reentrancy.
	* include/profile/iterator_tracker.h
	(__iterator_tracker<>::operator=): Add missing _M_ds assignment.
	(__iterator_tracker<>::_M_find): Delete.
	* include/profile/impl/profiler.h
	([_GLIBCXX_PROFILE_REENTRANCE_GUARD]): Delete.
	(__container_size_info): Add class declaration.
	(__hashfunc_info): Likewise.
	(__map2umap_info): Likewise.
	(__vector2list_info): Likewise.
	(__list2slist_info): Likewise.
	(__list2vector_info): Likewise.
	(__trace_list_to_set_destruct): Delete declaration.
	(__trace_list_to_set_construct): Likewise.
	(__trace_list_to_set_insert): Likewise.
	(__trace_list_to_set_iterate): Likewise.
	(__trace_list_to_set_invalid_operator): Likewise.
	(__trace_list_to_set_find): Likewise.
	([__profcxx_report]): Remove usage of _GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_turn_on]): Likewise.
	([__profcxx_turn_off]): Likewise.
	([__profcxx_is_invalid]): Likewise.
	([__profcxx_is_on]): Likewise.
	([__profcxx_is_off]): Likewise.
	([__profcxx_hashtable_resize]): Likewise.
	([__profcxx_hashtable_destruct]): Likewise.
	([__profcxx_hashtable_construct]): Likewise.
	([__profcxx_vector_size_construct]): Likewise.
	([__profcxx_vector_size_resize]): Likewise.
	([__profcxx_vector_size_destruct]): Likewise.
	([__profcxx_inefficient_hash_is_on]): Delete.
	([__profcxx_hash_func_construct]): Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_hash_func_destruct]): Likewise.
	([__profcxx_vector_construct2]): Rename into...
	([__profcxx_vector2list_construct]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_vector_insert]): Rename into...
	([__profcxx_vector2list_insert]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_vector_iterate]): Rename into...
	([__profcxx_vector2list_iterate]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_vector_invalid_operator]): Rename into...
	([__profcxx_vector2list_invalid_operator]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_vector_resize2]): Rename into...
	([__profcxx_vector2list_resize]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_vector_destruct2]): Rename into...
	([__profcxx_vector2list_destruct]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_vector_find]): Delete.
	([__profcxx_list_construct2]): Rename into...
	([__profcxx_list2vector_construct]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_list_insert]): Rename into...
	([__profcxx_list2vector_insert]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_list_iterate]): Rename into...
	([__profcxx_list2vector_iterate]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([_profcxx_list_invalid_operator]): Rename into...
	([__profcxx_list2vector_invalid_operator]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_list_destruct2]): Rename into...
	([__profcxx_list2vector_destruct]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_list_construct]): Rename into...
	([__profcxx_list2slist_construct]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_list_rewind]): Rename into...
	([__profcxx_list2slist_rewind]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_list_operation]): Rename into...
	([__profcxx_list2slist_operation]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_list_destruct]): Rename into...
	([__profcxx_list2slist_destruct]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_map_to_unordered_map_construct]): Rename into...
	([__profcxx_map2umap_construct]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_map_to_unordered_map_insert]): Rename into...
	([__profcxx_map2umap_insert]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_map_to_unordered_map_erase]): Rename into...
	([__profcxx_map2umap_erase]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_map_to_unordered_map_iterate]): Rename into...
	([__profcxx_map2umap_iterate]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_map_to_unordered_map_invalidate]): Rename into...
	([__profcxx_map2umap_invalidate]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_map_to_unordered_map_find]): Rename into...
	([__profcxx_map2umap_find]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	([__profcxx_map_to_unordered_map_destruct]): Rename into...
	([__profcxx_map2umap_destruct]): ... this. Remove usage of
	_GLIBCXX_PROFILE_REENTRANCE_GUARD.
	* include/profile/list
	(_List_profile): Adapt.
	(_List_profile::_M_profile_construct): New.
	(_List_profile()): Call latter.
	(_List_profile::_M_profile_destruct): New.
	(~_List_profile()): Call latter.
	(_List_profile::_M_swap): New.
	(_List_profile(_List_profile&&)): Call latter.
	(_List_profile::operator=(const _List_profile&)): Reinit profile
	structures.
	(_List_profile::operator=(_List_profile&&)): Move profile struct and
	re-init profile structures on moved instance.
	(std::__profile::list<>): Adapt.
	* include/profile/ordered_base.h
	(_Ordered_profile::_M_profile_iterate): New.
	(_Ordered_profile::_M_profile_construct): New.
	(_Ordered_profile()): Call latter.
	(_Ordered_profile::_M_swap): New.
	(_Ordered_profile(_Ordered_profile&&)): Call latter.
	(_Ordered_profile::operator=(const _Ordered_profile&)): Reinit
	profiling.
	(_Ordered_profile::operator=(_Ordered_profile&&)): Swap and reinit
	profiling on the moved instance.
	(_Ordered_profile::_M_profile_destruct): New.
	(~_Ordered_profile()): Call latter.
	* include/profile/map.h (std::__profile::map<>): Add profiling on
	iterators. Adapt.
	* include/profile/multimap.h (std::__profile::multimap<>): Likewise.
	* include/profile/set.h (std::__profile::set<>): Likewise.
	* include/profile/multiset.h (std::__profile::multiset<>): Likewise.
	* include/profile/unordered_base.h
	(_Unordered_profile::_M_profile_construct): New.
	(_Unordered_profile()): Call latter.
	(_Unordered_profile::_M_swap): New.
	(_Unordered_profile(_Unordered_profile&&)): Call latter.
	(_Unordered_profile::operator=(const _Unordered_profile&)): Reinit
	profiling.
	(_Unordered_profile::operator=(_Unordered_profile&&)): Swap and reinit
	profiling on the moved instance.
	(_Unordered_profile::_M_profile_destruct): New.
	(~_Ordered_profile()): Call latter.
	* include/profile/unordered_map
	(std::__profile::unordered_map<>): Adapt.
	(std::__profile::unordered_multimap<>): Adapt.
	* include/profile/unordered_set
	(std::__profile::unordered_set<>): Adapt.
	(std::__profile::unordered_multiset<>): Adapt.
	* include/profile/vector
	(_Vector_profile_pre::_M_profile_destruct): Move...
	(_Vector_profile_post::_M_profile_destruct): ...here.
	(_Vector_profile_post::_M_profile_construct): New.
	(_Vector_profile_post()): Call latter.
	(std::__profile::vector<>): Adapt.
	* testsuite/ext/profile/mh.cc: Rename into...
	* testsuite/ext/profile/replace_new.cc: ... this and fix test.

From-SVN: r217321
2014-11-10 21:51:58 +00:00
François Dumont 6c52b7dfc4 re PR libstdc++/63698 (std::set leaks nodes on assignment)
2014-11-04  François Dumont  <fdumont@gcc.gnu.org>
	    Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/63698
	* include/bits/stl_tree.h (_Reuse_or_alloc_node): Simplify constructor.
	Always move to the left node if there is one.
	* testsuite/23_containers/set/allocator/move_assign.cc (test04): New.

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

From-SVN: r217154
2014-11-05 19:16:13 +00:00
Jonathan Wakely 2acb709654 * testsuite/util/testsuite_allocator.h (operator==): Fix recursion.
From-SVN: r217090
2014-11-04 16:54:49 +00:00
Jonathan Wakely 335a3ed6a1 numeric.h: Do not use default arguments in function template redeclarations (definitions).
* include/parallel/numeric.h: Do not use default arguments in function
	template redeclarations (definitions).

From-SVN: r217069
2014-11-04 03:41:16 +00:00
Jonathan Wakely d3cf41899e Do not assume allocator is assignable.
* include/bits/stl_deque.h (_Deque_base(_Deque_base&&)): Copy
	allocator instead of moving.
	* testsuite/23_containers/deque/allocator/move-2.cc: New.

From-SVN: r217068
2014-11-04 03:41:12 +00:00
Jonathan Wakely 565115eaaf Make reference_wrapper trivially copyable.
* include/std/functional (reference_wrapper): Define copy constructor
	and copy assignment as defaulted.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error.
	* testsuite/20_util/reference_wrapper/requirements.cc: New.

From-SVN: r217067
2014-11-04 02:49:33 +00:00
Jonathan Wakely ac6f071ad9 Use ctype_base::blank in regex_traits.
* include/bits/regex.h (regex_traits::_RegexMask): Remove _S_blank and
	adjust _S_valid_mask.
	* include/bits/regex.tcc (regex_traits::lookup_classname): Use
	ctype_base::blank.

From-SVN: r217066
2014-11-04 02:49:30 +00:00
Jonathan Wakely 9bcb72e0b0 * include/std/functional (_Bind_simple): Simplify construction.
From-SVN: r217065
2014-11-04 02:49:27 +00:00
Jonathan Wakely 8a57bed1d6 Use aliases for type traits in C++14 mode.
* include/bits/unique_ptr.h (make_unique): Use alias for trait.
	* include/experimental/optional (__constexpr_addressof): Likewise.
	(_Optional_base, optional, make_optional): Likewise.

From-SVN: r217064
2014-11-04 02:49:20 +00:00
Paolo Carlini 3384321048 algo.h: Do not use default arguments in function template redeclarations (definitions).
2014-11-03  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/parallel/algo.h: Do not use default arguments in function
	template redeclarations (definitions).

From-SVN: r217050
2014-11-03 17:54:59 +00:00
Jonathan Wakely afc449e82c Check number of arguments in bind expressions.
* include/std/functional (_Mem_fn_traits_base::__arity): New typedef.
	(_Mem_fn_base::_Arity): New typedef.
	(_Bind_check_arity): New class template.
	(_Bind_helper, _Bindres_helper, _Bind_simple_helper): Check arity.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error.

From-SVN: r217025
2014-11-03 02:55:36 +00:00
Jonathan Wakely 8d9076969b Add support for ref-qualified functions to std::mem_fn
PR libstdc++/57898
	* include/std/functional (_Mem_fn_traits_base): New class template.
	(_Mem_fn_traits): New class template with specializations for every
	combination of cv-qualified and ref-qualified member function.
	(_Mem_fn_base): New class template for all pointer to member function
	types and partial specialization for pointer to member object types.
	(_Mem_fn): Inherit from _Mem_fn_base.
	* testsuite/20_util/function_objects/mem_fn/refqual.cc: New.

From-SVN: r217024
2014-11-03 02:55:32 +00:00
Jonathan Wakely ccd615e3fd Make std::vector<bool> meet C++11 allocator requirements.
* include/bits/stl_bvector.h (_Bvector_base): Use allocator_traits.
	(_Bvector_base::_Bvector_impl): Use allocator's pointer type.
	(_Bvector_base::_M_end_addr()): Convert to raw pointer.
	(vector<bool>): Use allocator_traits and _M_end_addr. Add allocator
	extended constructors.
	* include/bits/vector.tcc (vector<bool>): Use allocator_traits and
	_M_end_addr.
	* testsuite/23_containers/vector/bool/allocator/copy.cc: New.
	* testsuite/23_containers/vector/bool/allocator/minimal.cc: New.
	* testsuite/23_containers/vector/bool/allocator/noexcept.cc: New.
	* testsuite/23_containers/vector/bool/allocator/copy_assign.cc: New.
	* testsuite/23_containers/vector/bool/allocator/move.cc: New.
	* testsuite/23_containers/vector/bool/allocator/swap.cc: New.
	* testsuite/23_containers/vector/bool/allocator/ext_ptr.cc: New.
	* testsuite/23_containers/vector/bool/allocator/move_assign.cc: New.

From-SVN: r216988
2014-10-31 20:49:40 +00:00
David Edelsohn 020bd6f43f configure.host (aix5+): New stanza.
* configure.host (aix5+): New stanza.
        (aix4.3+): Do not use -G in link command.

From-SVN: r216935
2014-10-30 10:20:50 -04:00