Commit Graph

7536 Commits

Author SHA1 Message Date
Benjamin Kosnik 576a1fe25a *: Regenerate.
2012-01-17  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/html/*: Regenerate.

From-SVN: r183264
2012-01-17 23:50:28 +00:00
Benjamin Kosnik 43fe49ecf1 configure.ac (BUILD_EPUB): Adjust for epub3.
2012-01-17  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.ac (BUILD_EPUB): Adjust for epub3.
	* configure: Regenerate.
	* Makefile.in: Same.
	* doc/Makefile.am (stamp-epub-docbook): Update for epub3.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Same.
	* libsupc++/Makefile.in: Same.
	* po/Makefile.in: Same.
	* python/Makefile.in: Same.
	* src/Makefile.in: Same.
	* testsuite/Makefile.in: Same.

	* doc/xml/manual/documentation_hacking.xml: Update.

From-SVN: r183263
2012-01-17 23:39:21 +00:00
Rainer Orth 99eb180f66 Link libstdc++ with -lpthread on IRIX 6 (PR target/47852)
PR target/47852
	* configure.host (irix6.5*): Add -lpthread to OPT_LDFLAGS.

From-SVN: r183251
2012-01-17 15:41:10 +00:00
Jonathan Wakely af7b9e82d0 * include/bits/stl_iterator.h (reverse_iterator): Doxygen comments.
From-SVN: r183182
2012-01-14 17:47:18 +00:00
François Dumont f86b266c7c hashtable_policy.h (_Hash_node_base): New, use it as base class of ...
2012-01-13  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/hashtable_policy.h (_Hash_node_base): New, use it as
	base class of ...
	(_Hash_node<Value, true>, _Hash_node<Value, false>): ... those.
	* include/bits/hashtable.h (_Hashtable): Replace _M_begin_bucket_index
	by _M_before_begin. Review implementation so that we do not need to
	look for previous non-empty bucket when inserting nodes.

From-SVN: r183164
2012-01-13 21:49:14 +00:00
Benjamin Kosnik c1da2dc9d3 [multiple changes]
2012-01-09  Kai Tietz  <ktietz@redhat.com>

	PR libstc++/51673 part 2
	* config/abi/pre/gnu-versioned-namespace.ver: Adjusted new/delete
	operators signature for LLP64 size_t, and adjusted signatures for
	mt-allocator using size_t.

2012-01-09  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstc++/51673 part 1
	* config/abi/pre/gnu-versioned-namespace.ver: Sync cxxabi symbols
	with gnu.ver.

From-SVN: r183043
2012-01-09 23:39:22 +00:00
Benjamin Kosnik 4f7c82dcdb fragment.am (WARN_CXXFLAGS): Add -Wabi.
2012-01-09  Benjamin Kosnik  <bkoz@redhat.com>

	* fragment.am (WARN_CXXFLAGS): Add -Wabi.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Same.
	* include/Makefile.in: Same.
	* libsupc++/Makefile.in: Same.
	* src/Makefile.in: Same.
	* testsuite/Makefile.in: Same.
	* po/Makefile.in: Same.
	* python/Makefile.in: Same.

From-SVN: r183034
2012-01-09 21:50:18 +00:00
Jonathan Wakely 8dfb08abc3 printers.py (StdForwardListPrinter): Add.
* python/libstdcxx/v6/printers.py (StdForwardListPrinter): Add.
	* testsuite/libstdc++-prettyprinters/cxx11.cc: New.

From-SVN: r182989
2012-01-08 12:34:00 +00:00
Jason Merrill 4b6aaa996e re PR c++/6057 (expression mangling doesn't work for operator new)
PR c++/6057
	PR c++/48051
	PR c++/50855
	PR c++/51322
gcc/cp/
	* mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
	THROW_EXPR, CONSTRUCTOR, OVERLOAD.  Fix PREINCREMENT_EXPR and
	PREDECREMENT_EXPR.
	(write_template_arg): Fix mangling of class-scope functions and
	argument packs.
	(mangle_decl): Update suggested -fabi-version argument.
	* operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
	DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
	* tree.c (dependent_name): No longer static.
	* cp-tree.h: Declare it.
	* pt.c (unify): Defer handling of unconverted functions.
include/
	* demangle.h (enum demangle_component_type): Add
	DEMANGLE_COMPONENT_INITIALIZER_LIST, DEMANGLE_COMPONENT_NULLARY.
libiberty/
	* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_NULLARY and
	DEMANGLE_COMPONENT_INITIALIZER_LIST.
	(d_make_comp): Likewise.  Allow null right arg for
	DEMANGLE_COMPONENT_TRINARY_ARG2.
	(cplus_demangle_operators): Adjust new/delete; add .*, :: and throw.
	(d_template_args, d_template_arg): Handle 'J' for argument packs.
	(d_exprlist): Add terminator parm.
	(d_expression, d_print_comp): Handle initializer lists, nullary
	expressions, prefix/suffix operators, and new.
	(d_print_subexpr): Avoid parens around DEMANGLE_COMPONENT_QUAL_NAME
	and DEMANGLE_COMPONENT_INITIALIZER_LIST.
	* testsuite/demangle-expected: Add tests.

From-SVN: r182970
2012-01-06 16:39:43 -05:00
Jonathan Wakely 6e576613f7 re PR libstdc++/51504 (Data race hunting instructions in manual do not work)
PR libstdc++/51504
	* doc/xml/manual/debug.xml: Suggest using symbol interposition
	to override symbols using annotation macros.

From-SVN: r182943
2012-01-06 01:26:06 +00:00
François Dumont f7d6ad0a5c hashtable_policy.h (_Hashtable_base<>::_M_eq()): protected rather than private, use it...
2012-01-05  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/hashtable_policy.h (_Hashtable_base<>::_M_eq()):
	protected rather than private, use it...
	* include/bits/hashtable.h (_Hashtable<>::key_eq()): ... here.
	* testsuite/23_containers/unordered_set/observers.cc: New.
	* testsuite/23_containers/unordered_multiset/observers.cc: New.
	* testsuite/23_containers/unordered_map/observers.cc: New.
	* testsuite/23_containers/unordered_multimap/observers.cc: New.

From-SVN: r182928
2012-01-05 20:59:17 +00:00
François Dumont 866622072a Restore 2012 entries that hasn't been saved.
From-SVN: r182926
2012-01-05 20:50:51 +00:00
François Dumont 632c71230e Roll ChangeLog file, move 2012 entries in the new ChangeLog.
From-SVN: r182925
2012-01-05 20:49:15 +00:00
François Dumont 346afd846b hashtable_policy.h (_Ebo_helper<>): Rename to the more specific _Hashtable_ebo_helper.
2012-01-03  François Dumont <fdumont@gcc.gnu.org>

	* include/bits/hashtable_policy.h (_Ebo_helper<>): Rename to the more
	specific _Hashtable_ebo_helper. Hide this implementation detail thanks
	to private inheritance.

From-SVN: r182857
2012-01-03 20:33:20 +00:00
Paolo Carlini 2b59b5284f re PR c++/51738 (C++11 initializer list does not work correctly with operator[])
/gcc/cp
2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51738
	* parser.c (cp_parser_postfix_open_square_expression): Handle
	postfix-expression [ braced-init-list ].

/gcc/testsuite
2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51738
	* g++.dg/cpp0x/initlist-postfix-open-square.C: New.

/libstdc++-v3
2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51738
	* testsuite/23_containers/map/element_access/39901.cc: New.

From-SVN: r182856
2012-01-03 20:25:16 +00:00
Jonathan Wakely 553fb1c201 Fix _Locale vs. _Local typos.
From-SVN: r182756
2011-12-31 17:04:10 +00:00
Jonathan Wakely 84de2982de extensions.xml: Improve markup and note that some extensions are included in C++11.
* doc/xml/manual/extensions.xml: Improve markup and note that some
	extensions are included in C++11.
	* doc/xml/manual/concurrency_extensions.xml: Likewise.

From-SVN: r182742
2011-12-30 13:46:18 +00:00
Paolo Carlini f32fd5aaec re PR libstdc++/51711 (regex.h contains incorrect code)
2011-12-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/51711
	* include/bits/regex.h (regex_replace): Fix thinko.
	* testsuite/28_regex/algorithms/regex_replace/char/51711.cc: New.
	* testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc:
	Likewise.

From-SVN: r182740
2011-12-30 11:40:37 +00:00
Paolo Carlini cc74ac5dbc hashtable_policy.h (struct _Ebo_helper<>): Don't use _N, badname on Solaris; minor stylistic changes.
2011-12-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable_policy.h (struct _Ebo_helper<>): Don't use
	_N, badname on Solaris; minor stylistic changes.

From-SVN: r182734
2011-12-29 22:04:16 +00:00
François Dumont a188284c61 re PR libstdc++/51608 ([C++11] Unordered containers end(size_type) isn't constant time)
2011-12-29  François Dumont <fdumont@gcc.gnu.org>

	PR libstdc++/51608
	* include/bits/hashtable_policy.h (_Equal_helper<>): New, change the
	way the _Equal functor is used depending on whether hash code is
	cached or not.
	(_Ebo_helper<>): New helper type to introduce EBO when possible.
	(_Hash_code_base): Use _Ebo_helper to limit memory footprint. Move
	_Equal functor management...
	(_Hashtable_base): ...here, new, use _Equal_helper.
	(_Local_iterator_base<>, _Locale_iterator<>, _Locale_const_iterator<>):
	New, use _Hash_code_base, implementation of...
	* include/bits/hashtable.h (_Hashtable<>::local_iterator,
	_Hashtable<>::const_local_iterator): ...those. Add static assertions
	checking that some functors are empty depending on whether hash code
	is cache or not.
	(_Hashtable<>::_M_bucket_index): New overloads using current bucket
	count, use through out the _Hastable<> implementation.
	* include/bits/unordered_set.h (__unordered_set<>,
	__unordered_multiset<>): Cache hash code iff hash functor is not
	empty and not final.
	* include/bits/unordered_map.h (__unordered_map<>,
	__unordered_multimap<>): Likewise.
	* include/debug/unordered_map
	(unordered_map<>::_S_to_local, unordered_multimap<>::_S_to_local):
	Adapt to match new local iterator implementation.
	* include/debug/unordered_set (unordered_set<>::_S_to_local,
	unordered_multiset<>::_S_to_local): Likewise.
	* include/profile/unordered_map (unordered_map<>::_M_profile_destruct,
	unordered_multimap<>::_M_profile_destruct): Enhance thanks to usage of
	local iterators.
	* include/profile/unordered_set (unordered_set<>::_M_profile_destruct,
	unordered_multiset<>::_M_profile_destruct): Likewise.
	* testsuite_files/23_containers/unordered_set/instantiation_neg.cc:
	Fix error line.
	* testsuite_files/23_containers/unordered_set/final_hash.cc: New.
	* testsuite_files/23_containers/unordered_multiset/final_hash.cc: New.
	* testsuite_files/23_containers/unordered_map/final_hash.cc: New.
	* testsuite_files/23_containers/unordered_multimap/final_hash.cc: New.

From-SVN: r182727
2011-12-29 17:58:51 +00:00
Jonathan Wakely 10b293bbd0 re PR libstdc++/51701 (Remove reference to Henry Suter's RWLock from documentation)
PR libstdc++/51701
	* doc/xml/manual/extensions.xml (Input and Output): Remove reference
	to RWLock class.

From-SVN: r182724
2011-12-29 15:41:37 +00:00
Jonathan Wakely 7a37d6eaff weak_ptr_expired.cc: Modify to PASS instead of XFAIL.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/
	weak_ptr_expired.cc: Modify to PASS instead of XFAIL.

From-SVN: r182661
2011-12-23 17:31:00 +00:00
Kai Tietz 737be29e4c * config/os/mingw32-w64/os_defines.h (__USE_MINGW_ANSI_STDIO): Define.
From-SVN: r182660
2011-12-23 18:23:38 +01:00
Jonathan Wakely 94dcac11e5 * include/c_global/cinttypes: Update comments that refer to TR1.
From-SVN: r182659
2011-12-23 17:20:44 +00:00
Jonathan Wakely 7e98765e75 re PR libstdc++/49204 ([C++0x] remaining issues in <future>)
PR libstdc++/49204
	* include/std/future (future_errc): Implement LWG 2056.

From-SVN: r182658
2011-12-23 16:10:48 +00:00
Jonathan Wakely 2ae90de665 regex.h (match_results::size_type): Use allocator_traits.
* include/bits/regex.h (match_results::size_type): Use
	allocator_traits.

From-SVN: r182645
2011-12-23 01:47:41 +00:00
Jonathan Wakely 7bde813394 re PR libstdc++/48362 (pretty printer fails for zero-size std::tuple<>)
PR libstdc++/48362
	* testsuite/libstdc++-prettyprinters/48362.cc: New.

From-SVN: r182632
2011-12-22 18:58:15 +00:00
Jonathan Wakely 9dacb44bf1 re PR libstdc++/48362 (pretty printer fails for zero-size std::tuple<>)
PR libstdc++/48362
	* python/libstdcxx/v6/printers.py (StdTuplePrinter): Handle empty
	tuples.

From-SVN: r182620
2011-12-22 12:33:15 +00:00
Jonathan Wakely d8ab827382 re PR libstdc++/51365 (cannot use final empty class in std::tuple)
PR libstdc++/51365
	* include/std/tuple (_Tuple_impl): Check __is_final as well as
	is_empty.
	* testsuite/20_util/tuple/51365.cc: New.

From-SVN: r182523
2011-12-20 09:09:50 +00:00
Benjamin Kosnik d50fb67123 eh_tm.cc (free_any_cxa_exception): Use __GCC_ATOMIC_INT_LOCK_FREE, not _GLIBCXX_ATOMIC_BUILTINS_4.
2011-12-19  Benjamin Kosnik  <bkoz@redhat.com>

	* libsupc++/eh_tm.cc (free_any_cxa_exception): Use
	__GCC_ATOMIC_INT_LOCK_FREE, not _GLIBCXX_ATOMIC_BUILTINS_4.

From-SVN: r182512
2011-12-20 00:16:25 +00:00
Benjamin Kosnik 31785b29ee search_n.cc: Disambiguate local variable.
2011-12-19  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/performance/25_algorithms/search_n.cc: Disambiguate
	local variable.

From-SVN: r182510
2011-12-19 23:29:14 +00:00
Jonathan Wakely 14227713ba iterators.xml: Replace "sect1" with "section".
* doc/xml/manual/iterators.xml: Replace "sect1" with "section".
	* doc/xml/manual/algorithms.xml: Likewise.
	* doc/html/manual/iterators.html: Likewise.
	* doc/html/manual/algorithms.html: Likewise.

From-SVN: r182453
2011-12-18 01:06:15 +00:00
Kai Tietz 2ecb85c86b re PR target/51135 (SIGSEGV during exception cleanup on win32)
PR libstdc++/51135
        * libsupc++/unwind-cxx.h (__cxa_exception): Mark
        exceptionDestructor by _GLIBCXX_CDTOR_CALLABI.
        * libsupc++/eh_throw.cc (__cxa_throw): Mark destructor
        function argument by _GLIBCXX_CDTOR_CALLABI.
        * libsupc++/cxxabi.h (__cxa_throw): Likewise.
        (_GLIBCXX_CDTOR_CALLABI): Add empty default
        definition.
        * config/os/mingw32-w64/os_defines.h (_GLIBCXX_CDTOR_CALLABI): Define
        for IA-32 target as __thiscall.
        * config/os/mingw32/os_defines.h (_GLIBCXX_CDTOR_CALLABI): Likewise.

From-SVN: r182410
2011-12-16 19:43:06 +01:00
Paolo Carlini 92637e93ed re PR libstdc++/51558 (Declaration of unspecialized std::hash<_Tp>::operator()(_Tp) turns compile-time errors into link-time errors)
2011-12-15  Paolo Carlini  <paolo.carlini@oracle.com>
	    Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/51558
	* include/bits/functional_hash.h (struct hash): Add static_assert.
	* src/compatibility-c++0x.cc: Adjust compatibility definitions.
	* testsuite/23_containers/unordered_map/erase/51142.cc: Adjust.
	* testsuite/23_containers/unordered_set/erase/51142.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/erase/51142.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/erase/51142.cc: Likewise.

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

From-SVN: r182392
2011-12-15 22:15:21 +00:00
Benjamin Kosnik faf81b1a18 9780-2.cc: Add test for "C" locale, add sanity checks in case of grouping.
2011-12-15  Benjamin Kosnik  <bkoz@redhat.com>

        * testsuite/22_locale/num_put/put/char/9780-2.cc: Add test for "C"
        locale, add sanity checks in case of grouping.

From-SVN: r182385
2011-12-15 19:02:51 +00:00
Jonathan Wakely d36971dd86 re PR libstdc++/51540 (doxygen documentation for partial_sum misleading)
PR libstdc++/51540
	* include/bits/stl_numeric.h (partial_sum): Adjust doxygen comments.

From-SVN: r182359
2011-12-15 09:49:59 +00:00
Paolo Carlini 60f3dad78d revert: re PR target/51135 (SIGSEGV during exception cleanup on win32)
2011-12-12  Paolo Carlini  <paolo.carlini@oracle.com>

	Revert:
	2011-12-12  Kai Tietz  <ktietz@redhat.com>

	PR libstdc++/51135
	* libsupc++/cxxabi.h (__cxa_dtor_type): New type.
	(__cxa_throw): Use it for destructor-argument.
	* libsupc++/eh_throw.cc (__cxa_throw): Likewise.
	* libsupc++/unwind-cxx.h (__cxa_exception): Change type of member
	exceptionDestructor to __cxa_dtor_type.
	* config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_THISCALL_ON_DTOR):
	Define.
	(__cxa_dtor_type): Declare target secific type variant.
	* config/os/mingw32/os_defines.h: Likewise.

From-SVN: r182250
2011-12-12 17:34:19 +00:00
Paolo Carlini 7252b079fc 2011-12-12 Paolo Carlini <paolo.carlini@oracle.com>
* Revert the last commit.

From-SVN: r182249
2011-12-12 17:29:17 +00:00
Kai Tietz 83d5afb779 Correct bug-number in ChangeLog.
PR libstdc++/51135
        * libsupc++/cxxabi.h (__cxxabi_dtor_type): New type.
        (__cxa_throw): Use it for destructor-argument.
        * libsupc++/eh_throw.cc (__cxa_throw): Likewise.
        * libsupc++/unwind-cxx.h (__cxa_exception): Change type of member
        exceptionDestructor to __cxxabi_dtor_type.
        * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_THISCALL_ON_DTOR):
        Define.
        (__cxa_dtor_type): Declare target secific type variant.
        * config/os/mingw32/os_defines.h: Likewise.

From-SVN: r182238
2011-12-12 14:29:10 +01:00
Kai Tietz f5c48b80ce PR libstdc++/511135
* libsupc++/cxxabi.h (__cxxabi_dtor_type): New type.
	(__cxa_throw): Use it for destructor-argument.
	* libsupc++/eh_throw.cc (__cxa_throw): Likewise.
	* libsupc++/unwind-cxx.h (__cxa_exception): Change type of member
	exceptionDestructor to __cxxabi_dtor_type.
	* config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_THISCALL_ON_DTOR):
	Define.
	(__cxa_dtor_type): Declare target secific type variant.
	* config/os/mingw32/os_defines.h: Likewise.

From-SVN: r182237
2011-12-12 14:24:30 +01:00
Jonathan Wakely be0c93c512 abi.xml: Replace gcc-x.y.z with GCC x.y.z or x.y...
* doc/xml/manual/abi.xml: Replace gcc-x.y.z with GCC x.y.z or x.y,
	remove excessive duplication of version information.
	* doc/html/*: Regenerate.

From-SVN: r182206
2011-12-11 14:59:26 +00:00
Paolo Carlini 5d74133f84 2011-12-11 Paolo Carlini <paolo.carlini@oracle.com>
* Tweak ChangeLog.

From-SVN: r182200
2011-12-11 10:32:04 +00:00
Benjamin Kosnik 7897a1c029 user.cfg.in: Add macros, directories.
2011-12-10  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/doxygen/user.cfg.in: Add macros, directories.
	* include/bits/locale_classes.h: Remove doxygen warnings, fix markup.
	* include/bits/locale_classes.tcc: Same.
	* include/bits/shared_ptr.h: Same.
	* include/bits/stl_algo.h: Same.
	* include/bits/stl_list.h: Same.
	* include/bits/stl_numeric.h: Same.
	* include/debug/safe_base.h: Same.
	* include/parallel/equally_split.h: Same.
	* include/std/bitset: Same.
	* include/std/complex: Same.
	* include/std/fstream: Same.
	* include/std/istream: Same.
	* include/std/ostream: Same.
	* include/tr2/dynamic_bitset: Same.
	* scripts/run_doxygen: Remove munging for names that no longer exist.

	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
	Adjust line numbers.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_1_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_2_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.

From-SVN: r182189
2011-12-10 15:33:06 +00:00
François Dumont f431d7ca38 unordered_set: Minor formatting changes.
2011-12-12  François Dumont <fdumont@gcc.gnu.org>

	* include/profile/unordered_set: Minor formatting changes.
	(unordered_set<>::_M_profile_destruct,
	unordered_multiset<>::_M_profile_destruct): Fix implementation to not
	rely on normal implementation details anymore.
	(unordered_set<>::_M_profile_resize,
	unordered_multiset<>::_M_profile_resize): Implement consistently
	accross all unordered containers.
	(unordered_set<>::emplace, unordered_set<>::emplace_hint,
	unordered_multiset<>::emplace, unordered_multset<>::emplace_hint): Add
	to signal rehash to profiling system.
	* include/profile/unordered_map: Likewise for unordered_map<> and
	unordered_multimap<>.

From-SVN: r182188
2011-12-10 14:00:03 +00:00
François Dumont 9b81593bbc hashtable.h (_Hashtable<>::emplace, [...]): Add.
2011-12-09  François Dumont <fdumont@gcc.gnu.org>

	* include/bits/hashtable.h (_Hashtable<>::emplace,
	_Hashtable<>::emplace_hint): Add.
	* include/debug/unordered_set (unordered_set<>::emplace,
	unordered_set<>::emplace_hint, unordered_multiset<>::emplace,
	unordered_multiset<>::emplace_hint): Add.
	* include/profile/unordered_set: Likewise.
	* include/debug/unordered_map (unordered_map<>::emplace,
	unordered_map<>::emplace_hint, unordered_multimap<>::emplace,
	unordered_multimap<>::emplace_hint): Add.
	* include/profile/unordered_map: Likewise.
	* testsuite/23_containers/unordered_map/modifiers/emplace.cc: New.
	* testsuite/23_containers/unordered_multimap/modifiers/emplace.cc:
	New.
	* testsuite/23_containers/unordered_set/modifiers/emplace.cc: New.
	* testsuite/23_containers/unordered_multiset/modifiers/emplace.cc:
	New.
	* testsuite/util/testsuite_container_traits.h
	(traits_base::has_emplace): Add and defined as std::true_type for
	unordered containers.
	* testsuite/util/exception/safety.h (emplace, emplace_hint): Add and
	use them in basic_safety exception test case.
	* doc/xml/manual/status_cxx2011.xml: Update unordered containers
	status.

From-SVN: r182174
2011-12-09 20:01:04 +00:00
Jonathan Wakely 3d0c32fe56 atomic_base.h (__calculate_memory_order): Rename to...
* include/bits/atomic_base.h (__calculate_memory_order): Rename to...
	(__cmpexch_failure_order): This, and rewrite as constexpr function.
	(compare_exchange_strong, compare_exchange_weak): Use it.
	* include/std/atomic (compare_exchange_strong, compare_exchange_weak):
	Likewise.

From-SVN: r182105
2011-12-08 09:44:57 +00:00
François Dumont 95c0a8a714 re PR libstdc++/51386 (23_containers/unordered_set/hash_policy/load_factor.cc execution timeout)
2011-12-07  François Dumont <fdumont@gcc.gnu.org>

	PR libstdc++/51386
	* include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_next_bkt):
	Fix computation of _M_prev_resize so that hashtable do not keep on
	being rehashed when _M_max_load_factor is lower than 1.

From-SVN: r182085
2011-12-07 19:47:03 +00:00
Paolo Carlini 8535715d0f re PR libstdc++/51438 (std::exception and derived classes are not compatible with std::nested_exception and C++11 in general)
2011-12-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/51438
	* libsupc++/nested_exception.h (nested_exception::~nested_exception):
	Declare noexcept.
	* libsupc++/nested_exception.cc: Adjust.
	* testsuite/18_support/nested_exception/51438.cc: New.
	* testsuite/18_support/nested_exception/throw_with_nested.cc: Adjust.
	* testsuite/18_support/nested_exception/rethrow_if_nested.cc:
	Likewise.

	* src/shared_ptr.cc: Use noexcept where appropriate.
	* include/std/system_error: Likewise.
	* include/std/functional: Likewise.
	* include/bits/shared_ptr_base.h: Likewise.
	* src/stdexcept.cc: Use _GLIBCXX_USE_NOEXCEPT where appropriate.
	* include/std/stdexcept: Likewise.
	* libsupc++/bad_cast.cc: Likewise.
	* libsupc++/bad_typeid.cc: Likewise.
	* libsupc++/eh_exception.cc: Likewise.
	* libsupc++/typeinfo: Likewise.
	* libsupc++/exception: Likewise.
	* libsupc++/eh_ptr.cc: Likewise.
	* libsupc++/bad_alloc.cc: Likewise.
	* libsupc++/exception_ptr.h: Likewise.

	* include/std/chrono: Use noexcept where appropriate.
	* src/chrono.cc: Likewise.

From-SVN: r182064
2011-12-06 20:03:25 +00:00
Jonathan Wakely 62b547b5f6 re PR libstdc++/51183 (pair piecewise_construct_t constructor copies)
2011-12-06  Jonathan Wakely  <jwakely.gcc@gmail.com>
	    Chris Jefferson  <chris@bubblescope.net>

	PR libstdc++/51183
	* include/std/stl_pair.h (pair<>::__cons, pair<>::__do_cons): Remove.
	(pair<>::pair(piecewise_construct_t, tuple<>, tuple<>): Only declare.
	(pair<>::pair(tuple<>&, tuple<>&, _Index_tuple<>, _Index_tuple<>)):
	Declare.
	* include/std/tuple (pair<>::__cons, pair<>::__do_cons): Remove.
	(pair<>::pair(tuple<>&, tuple<>&, _Index_tuple<>, _Index_tuple<>)):
	Define.
	(pair<>::pair(piecewise_construct_t, tuple<>, tuple<>): Define,
	delegating to the latter.
	* testsuite/20_util/pair/piecewise2.cc: New.

Co-Authored-By: Chris Jefferson <chris@bubblescope.net>

From-SVN: r182054
2011-12-06 15:13:04 +00:00
Paolo Carlini 8972079e90 initializer_list: Do not declare anything if __GXX_EXPERIMENTAL_CXX0X__ is not defined.
2011-12-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* libsupc++/initializer_list: Do not declare anything if
	__GXX_EXPERIMENTAL_CXX0X__ is not defined.

From-SVN: r182031
2011-12-05 23:16:16 +00:00
Jonathan Wakely 13901e4b28 type_traits: Doxygen improvements.
* include/std/type_traits: Doxygen improvements.
	* include/bits/move.h: Likewise.
	* include/tr1/type_traits:  Likewise.
	* include/tr2/type_traits:  Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
	line numbers
	* testsuite/20_util/forward/c_neg.cc: Likewise.
	* testsuite/20_util/forward/f_neg.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.

From-SVN: r181993
2011-12-04 16:53:17 +00:00
Markus Trippelsdorf e13afbace1 stl_heap.h (pop_heap): Check for non-empty range in overload taking a predicate.
* include/bits/stl_heap.h (pop_heap): Check for non-empty range in
	overload taking a predicate.
	* testsuite/25_algorithms/pop_heap/empty2_neg.cc: New.

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

From-SVN: r181987
2011-12-04 13:21:53 +00:00
Jonathan Wakely a8028a3ee8 macros.h (__glibcxx_check_non_empty_range): Define.
* include/debug/macros.h (__glibcxx_check_non_empty_range): Define.
	* include/debug/debug.h (__glibcxx_requires_non_empty_range): Define.
	* include/debug/formatter.h (__msg_non_empty_range): Add.
	* src/debug.cc: Message text for __msg_non_empty_range.
	* include/bits/stl_heap.h (pop_heap): Check for non-empty range.
	* testsuite/25_algorithms/pop_heap/empty_neg.cc: New.

From-SVN: r181970
2011-12-03 15:35:35 +00:00
Jonathan Wakely 4ddd278c03 * doc/xml/manual/utilities.xml: Remove outdated text.
From-SVN: r181968
2011-12-03 12:29:11 +00:00
Paolo Carlini f5ca3c3408 iomanip (put_money): Fix thinko, use __err local, like in, eg, basic_ostream::_M_insert.
2011-12-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/iomanip (put_money): Fix thinko, use __err local,
	like in, eg, basic_ostream::_M_insert.

From-SVN: r181931
2011-12-02 17:23:08 +00:00
Benjamin Kosnik a152e96f01 acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Remove size-specific macros.
2011-11-30  Benjamin Kosnik  <bkoz@redhat.com>

        * acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Remove
        size-specific macros. _GLIBCXX_ATOMIC_BUILTINS_1,
        _GLIBCXX_ATOMIC_BUILTINS_2, _GLIBCXX_ATOMIC_BUILTINS_4,
        _GLIBCXX_ATOMIC_BUILTINS_8. Use _GLIBCXX_ATOMIC_BUILTINS to
        indicate use of C++11 atomic builtins.
        * config.h.in: Regenerate.
        * configure: Regenerate.
        * include/Makefile.am (bits_sup_headers): Add atomic_lockfree_defines.h.
        * include/Makefile.in: Regenerate.
        * libsupc++/Makefile.am: Compile C++11 support with -std=gnu++0x.
        * libsupc++/Makefile.in: Regenerate.

        * include/bits/atomic_base.h: Move lock-free property macros...
        * libsupc++/atomic_lockfree_defines.h: ...here.
        * include/std/future: Use C++11 macros.
        * libsupc++/eh_ptr.cc: Same.
        * libsupc++/eh_throw.cc: Same.
        * libsupc++/exception: Same.
        * libsupc++/exception_ptr.h: Same.
        * libsupc++/guard.cc: Same.
        * libsupc++/nested_exception.cc: Same.
        * libsupc++/nested_exception.h: Same.
        * src/future.cc: Same.

        * include/ext/atomicity.h: Use _GLIBCXX_ATOMIC_BUILTINS.

        * doc/doxygen/user.cfg.in
        * doc/xml/manual/concurrency_extensions.xml

        * testsuite/18_support/exception_ptr/lifespan.cc
        * testsuite/lib/libstdc++.exp

From-SVN: r181869
2011-12-01 02:20:32 +00:00
François Dumont 40207762a8 hashtable.h (_Hashtable<>::_M_rehash): Remove code useless now that the hashtable implementation put the hash code in...
2011-11-29  François Dumont <fdumont@gcc.gnu.org>

	* include/bits/hashtable.h (_Hashtable<>::_M_rehash): Remove code
	useless now that the hashtable implementation put the hash code in
	cache if the hash functor throws.
	* testsuite/23_containers/unordered_set/erase/1.cc: Enhance test by
	checking also distance between begin and end iterators to validate
	underlying data model.
	* testsuite/23_containers/unordered_multiset/erase/1.cc: Likewise.
	* testsuire/23_containers/unordered_map/erase/1.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/erase/1.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/erase/2.cc: New.
	* testsuite/23_containers/unordered_multimap/erase/2.cc: New.

From-SVN: r181799
2011-11-29 07:45:58 +00:00
Andrew MacLeod 62bad7cd05 c-family
* c-cpp-builtin.c (cpp_atomic_builtins):New.  Emit all atomic
	predefines in one place.  Add LOCK_FREE predefines.
	(c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
	new func.

	libstdc++-v3
	* include/bits/atomic_base.h (ATOMIC_*_LOCK_FREE): Use new cpp
	predefined macros.
	* testsuite/29_atomics/headers/atomic/macros.cc: Add BOOL and POINTER
	macro checks.  Check for expected compile time values.

From-SVN: r181784
2011-11-28 20:28:23 +00:00
Paolo Carlini 1a30353af8 re PR libstdc++/51288 ([C++0x] get_money implementation is missing the sentry object (does not skip leading whitespace))
2011-11-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/51288
	* include/std/iomanip (get_money, put_money): Use sentry.
	* testsuite/27_io/manipulators/extended/get_money/char/51288.cc: New.
	* testsuite/27_io/manipulators/extended/get_money/wchar_t/51288.cc:
	Likewise.
	* testsuite/27_io/manipulators/extended/put_money/char/51288.cc:
	Likewise.
	* testsuite/27_io/manipulators/extended/put_money/wchar_t/51288.cc:
	Likewise.

From-SVN: r181775
2011-11-28 13:24:23 +00:00
Gerald Pfeifer f6d93d7483 using.xml (Prerequisites): Refer to x86 instead of i386.
* doc/xml/manual/using.xml (Prerequisites): Refer to x86 instead
	of i386.

From-SVN: r181758
2011-11-27 02:42:21 +00:00
Gerald Pfeifer 70c6e9cb80 run_doxygen (problematic): Change Linux reference to GNU/Linux.
* scripts/run_doxygen (problematic): Change Linux reference to
	GNU/Linux.

From-SVN: r181757
2011-11-27 01:09:22 +00:00
Gerald Pfeifer 4aa3ff2b2e abi.xml (Prerequisites): Refer to GNU/Linux.
* doc/xml/manual/abi.xml (Prerequisites): Refer to GNU/Linux.
	Fix reference to GCC.

From-SVN: r181756
2011-11-27 00:21:28 +00:00
Jonathan Wakely 3a612dd1d0 re PR libstdc++/51296 (Several 30_threads tests FAIL on Tru64 UNIX)
PR libstdc++/51296
	* testsuite/30_threads/thread/native_handle/typesizes.cc: Do not run
	on alpha*-*-osf*.
	* testsuite/30_threads/future/cons/constexpr.cc: Disable debug
	symbols.
	* testsuite/30_threads/shared_future/cons/constexpr.cc: Likewise.

From-SVN: r181740
2011-11-26 15:15:22 +00:00
François Dumont da29608a7a re PR libstdc++/41975 ([C++0x] [DR579] unordered_set::erase performs worse when nearly empty)
2011-11-23  François Dumont <fdumont@gcc.gnu.org>

	PR libstdc++/41975
	* include/bits/hashtable.h (_Hashtable<>): Major data model
	modification to limit performance impact of empty buckets in
	erase(iterator) implementation.
	* include/bits/hashtable_policy.h (_Hashtable_iterator,
	_Hashtable_const_iterator): Remove not used anymore.
	* include/bits/hashtable_policy.h (_Prime_rehash_policy): Remove
	_M_grow_factor, just use natural evolution of prime numbers. Add
	_M_prev_size to know when the number of buckets can be reduced.
	* include/bits/unordered_set.h (__unordered_set<>,
	__unordered_multiset<>), unordered_map.h (__unordered_map<>,
	__unordered_multimap<>): Change default value of cache hash code
	template parameter, false for integral types with noexcept hash
	functor, true otherwise.
	* include/debug/unordered_map, unordered_set: Adapt transformation
	from iterator/const_iterator to respectively
	local_iterator/const_local_iterator.
	* testsuite/performance/23_containers/copy_construct/unordered_set.cc:
	New.
	* testsuite/23_containers/unordered_set/instantiation_neg.cc: New.
	* testsuite/23_containers/unordered_set/hash_policy/rehash.cc: New.
	* testsuite/23_containers/unordered_multiset/cons/copy.cc: New.
	* testsuite/23_containers/unordered_multiset/erase/1.cc,
	24061-multiset.cc: Add checks on the number of bucket elements.
	* testsuite/23_containers/unordered_multiset/insert/multiset_range.cc,
	multiset_single.cc, multiset_single_move.cc: Likewise.

From-SVN: r181677
2011-11-23 20:30:18 +00:00
Jason Merrill 8a262bafd1 fix linenos
From-SVN: r181624
2011-11-22 10:53:28 -05:00
Jonathan Wakely e02a544331 functional (is_placeholder, [...]): Add partial specializations for cv-qualified types.
* include/std/functional (is_placeholder, is_bind_expression): Add
	partial specializations for cv-qualified types.
	* include/tr1/functional (is_placeholder, is_bind_expression): Add
	partial specializations for std::bind and std::placeholders and for
	cv-qualified types.
	* testsuite/20_util/bind/cv_quals_3.cc: New.
	* testsuite/tr1/3_function_objects/bind/cv_quals.cc: New.
	* testsuite/tr1/3_function_objects/bind/mixed.cc: New.

From-SVN: r181607
2011-11-22 00:40:47 +00:00
Andreas Tobler c6084f681e Additional fixes for FreeBSD-10 build:
/:			* libtool.m4: Additional FreeBSD 10 fixes.

boehm-gc/:		* configure: Regenerate.
gcc/:			* configure: Regenerate.
libffi/:		* configure: Regenerate.
libgfortran/:		* configure: Regenerate.
libgomp/:		* configure: Regenerate.
libitm/:		* configure: Regenerate.
libjava/:		* configure.ac: Fix some more FreeBSD 10 issues..
			* configure: Regenerate.
libjava/libltdl/:	* acinclude.m4: Additional FreeBSD 10 fixes.
			* configure: Regenerate.
libmudflap/:		* configure: Regenerate.
libobjc/:		* configure: Regenerate.
libquadmath/:		* configure: Regenerate.
libssp/:		* configure: Regenerate.
libstdc++-v3/:		* configure: Regenerate.
lto-plugin/:		* configure: Regenerate.
zlib/:			* configure: Regenerate.

From-SVN: r181593
2011-11-21 20:22:35 +01:00
Paolo Carlini f3670c001c 2011-11-21 Paolo Carlini <paolo.carlini@oracle.com>
* Fix last ChangeLog entry.

From-SVN: r181558
2011-11-21 11:22:37 +00:00
Daniel Krugler 5db25ab107 re PR libstdc++/51185 ([C++0x] false-positive results of std::is_constructible)
2011-11-21  Daniel Krugler  <daniel.kruegler@googlemail.com>

	PR libstdc++/51185
	* include/std/type_traits (__is_base_to_derived_ref,
	__is_lvalue_to_rvalue_ref): Fix.
	* testsuite/20_util/is_constructible/51185.cc: New.
	* testsuite/20_util/is_constructible/value-2.cc: Extend.

From-SVN: r181557
2011-11-21 11:21:13 +00:00
Paolo Carlini bbee335668 2011-11-21 Paolo Carlini <paolo.carlini@oracle.com>
* Fix last ChangeLog entry.

From-SVN: r181556
2011-11-21 10:48:53 +00:00
Paolo Carlini a7cd7b6088 tuple (__conv_types, [...]): Remove.
2011-11-21  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/tuple (__conv_types, __one_by_one_convertible,
	__all_convertible): Remove.
	(tuple<>::tuple(_UElements&&...),
	tuple<>::tuple(const tuple<_UElements...>&),
	tuple<>::tuple(tuple<_UElements...>&&)): Remove wa for c++/48322.

From-SVN: r181555
2011-11-21 10:47:37 +00:00
Jason Merrill c67dd25689 re PR c++/48322 ([C++0x] Plural variadic parameter packs are not expanded well)
PR c++/48322
gcc/cp/
	* cp-tree.h (PACK_EXPANSION_EXTRA_ARGS): New.
	* cp-tree.def (EXPR_PACK_EXPANSION): Add an operand for it.
	* pt.c (tsubst_pack_expansion): Set and use it.
	(iterative_hash_template_arg): Hash it.
	(template_args_equal): Compare it.
	(comp_template_args_with_info): Handle nulls.
	* tree.c (cp_walk_subtrees): Walk it.
	* typeck.c (structural_comptypes): Compare it.
	* ptree.c (cxx_print_type): Print it.
libstdc++-v3/
	* include/std/tuple (tuple(_UElements&&...)): Fix SFINAE.

From-SVN: r181547
2011-11-20 21:04:54 -05:00
Jason Merrill 80ca43a314 pt.c (type_unification_real): Set input_location during default arg instantiation.
* pt.c (type_unification_real): Set input_location
	during default arg instantiation.

From-SVN: r181546
2011-11-20 21:04:38 -05:00
Jonathan Wakely 215c6c972d binders.h: Fix examples in doxygen comments and suggest using std::bind instead.
* include/backward/binders.h: Fix examples in doxygen comments and
	suggest using std::bind instead.

From-SVN: r181535
2011-11-20 21:14:56 +00:00
Jonathan Wakely 0c1c870b00 Fix grammar in ChangeLog entry.
From-SVN: r181534
2011-11-20 20:21:51 +00:00
Jonathan Wakely c37e667527 * doc/xml/manual/status_cxx2011.xml: Fix docbook markup.
From-SVN: r181533
2011-11-20 20:05:58 +00:00
Jonathan Wakely 062a902517 appendix_contributing.xml: Do not use "here" as link text.
* doc/xml/manual/appendix_contributing.xml: Do not use "here" as link
	text.
	* doc/xml/faq.xml: Likewise. Do not request standard library issues
	to be reported to the libstdc++ mailing list.
	* doc/xml/manual/status_cxx2011.xml: Document implementation-defined
	behaviour.
	* doc/xml/manual/status_cxxtr1.xml: Likewise.
	* doc/xml/manual/utilities.xml: Fix grammar, probably caused by a
	global search and replace of "part" by "chapter".
	* doc/xml/manual/shared_ptr.xml: Remove outdated information.
	* doc/xml/manual/messages.xml: Be more specific about systems where
	using 'int' for catalog handle is not a problem, mentioned LWG issue.

From-SVN: r181532
2011-11-20 19:56:48 +00:00
Paolo Carlini fc09e5b6bd bitset (operator[](size_t) const): Declare constexpr.
2011-11-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/debug/bitset (operator[](size_t) const): Declare constexpr.
	* include/profile/bitset: Likewise.
	* testsuite/23_containers/bitset/operations/constexpr.cc: Split out
	non portable bits to...
	* testsuite/23_containers/bitset/operations/constexpr-2.cc: ... here.

From-SVN: r181506
2011-11-19 11:50:44 +00:00
Harti Brandt 919f402ca5 re PR libstdc++/51209 (The template _M_find_node in hashtable.h has a bad return value)
2011-11-18  Harti Brandt  <hartmut.brandt@dlr.de>

	PR libstdc++/51209
	* include/bits/hashtable.h (_Hashtable<>::_M_find_node): Return
	nullptr when no node is found.
	* include/tr1/hashtable.h (_Hashtable<>::_M_find_node): Return
	zero when no node is found.

From-SVN: r181480
2011-11-18 16:09:29 +00:00
Paolo Carlini 72f1c34bd4 hash-long-double-aux.cc: Rename to...
2011-11-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* src/hash-long-double-aux.cc: Rename to...
	* src/hash-long-double-tr1-aux.cc: ... this.
	* src/compatibility-ldbl.cc: Adjust.
	* src/hash_tr1.cc: Likewise.
	* src/hash_c++0x.cc: Don't use src/hash-long-double-aux.cc.
	* include/bits/functional_hash.h (hash<_Tp*>::operator(), specs
	for integer types, hash<float>::operator(), hash<double>::operator(),
	hash<long double>::operator()): Declare noexcept.
	* include/debug/bitset (hash<__debug::bitset>::operator()): Likewise.
	* include/debug/vector (hash<__debug::vector>::operator()): Likewise.
	* include/std/system_error (hash<error_code>::operator()): Likewise.
	* include/std/thread (hash<thread::id>::operator()): Likewise.
	* include/std/bitset (hash<bitset>::operator()): Likewise.
	* include/std/typeindex (hash<type_index>::operator()): Likewise.
	* include/profile/bitset (hash<__profile::vector>::operator()):
	Likewise.
	* include/profile/vector (hash<__profile::vector>::operator()):
	Likewise.
	* include/ext/vstring.h (hash<__vstring>::operator(),
	hash<__wvstring>::operator(), hash<__u16vstring>::operator(),
	hash<__u32vstring>::operator()): Likewise.
	* include/bits/shared_ptr.h (hash<shared_ptr>::operator()): Likewise.
	* include/bits/shared_ptr_base.h (hash<__shared_ptr>::operator()):
	Likewise.
	* include/bits/unique_ptr.h (hash<unique_ptr>::operator()): Likewise.
	* include/bits/basic_string.h (hash<string>::operator(),
	hash<wstring>::operator(), hash<u16string>::operator(),
	hash<u32string>::operator()): Likewise.
	* include/bits/vector.tcc (hash<vector>::operator()): Likewise.
	* include/bits/stl_bvector.h (hash<vector>::operator()): Likewise.
	* libsupc++/typeinfo (type_info::hash_code): Use noexcept instead of
	throw().

From-SVN: r181473
2011-11-18 12:37:06 +00:00
Richard Henderson 1d794721ac re PR libstdc++/51181 (libstdc++.so __sync_sub_and_fetch_4 linkage error causing many test suite failures on m68k-linux)
PR libstdc++/51181
        * libsupc++/eh_tm.cc (free_any_cxa_exception): Protect the use
        of __sync_sub_and_fetch with _GLIBCXX_ATOMIC_BUILTINS_4.

From-SVN: r181465
2011-11-17 17:38:48 -08:00
Jonathan Wakely 7e8870e0aa typesizes.cc: Do not run on darwin.
* testsuite/30_threads/thread/native_handle/typesizes.cc: Do not run
	on darwin.

From-SVN: r181460
2011-11-18 00:15:55 +00:00
Jonathan Wakely f631ae2eb1 Remove accidentally committed duplicate ChangeLog entry.
From-SVN: r181458
2011-11-17 22:10:09 +00:00
Jason Merrill 830dea94f2 class.c (add_implicitly_declared_members): Update move conditions.
N3203
	* class.c (add_implicitly_declared_members): Update move
	conditions.

From-SVN: r181445
2011-11-17 11:35:11 -05:00
Jonathan Wakely ee42e4b6ef status_cxx2011.xml: Status of piecewise construction and ios_base::failure.
* doc/xml/manual/status_cxx2011.xml: Status of piecewise construction
	and ios_base::failure.
	* doc/xml/manual/backwards_compatibility.xml: List headers in
	alphabetical order.

From-SVN: r181438
2011-11-17 10:14:11 +00:00
Andrew MacLeod 3b04e1e4c4 re PR libstdc++/51102 (missing macros in <atomic>)
2011-11-16  Andrew MacLeod  <amacleod@redhat.com>

	PR libstdc++/51102
	* include/bits/atomic_base.h (ATOMIC_BOOL_LOCK_FREE,
	ATOMIC_POINTER_LOCK_FREE): New. Add missing macros.

From-SVN: r181414
2011-11-16 15:43:15 +00:00
Paolo Carlini 6dc88283f6 re PR libstdc++/51142 ([C++0x] map::erase(key) doesn't compile with -D_GLIBCXX_DEBUG.)
2011-11-15  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/51142
	* include/debug/unordered_map (unordered_map<>::erase(iterator),
	unordered_multimap<>::erase(iterator)): Add, consistently with
	LWG 2059.
	* include/debug/unordered_set (unordered_set<>::erase(iterator),
	unordered_multiset<>::erase(iterator)): Likewise.
	* include/debug/map.h (map<>::erase(iterator)): Likewise.
	* include/debug/multimap.h (multimap<>::erase(iterator)): Likewise.
	* include/profile/map.h (map<>::erase(iterator)): Likewise.
	* include/profile/multimap.h (multimap<>::erase(iterator)): Likewise.
	* include/bits/hashtable.h (_Hashtable<>::erase(iterator)): Likewise.
	* include/bits/stl_map.h (map<>::erase(iterator)): Likewise.
	* include/bits/stl_multimap.h (multimap<>::erase(iterator)): Likewise.
	* include/bits/stl_tree.h (_Rb_tree<>::erase(iterator)): Likewise.
	* testsuite/23_containers/unordered_map/erase/51142.cc: New.
	* testsuite/23_containers/multimap/modifiers/erase/51142.cc: Likewise.
	* testsuite/23_containers/set/modifiers/erase/51142.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/erase/51142.cc: Likewise.
	* testsuite/23_containers/unordered_set/erase/51142.cc: Likewise.
	* testsuite/23_containers/multiset/modifiers/erase/51142.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/erase/51142.cc: Likewise.
	* testsuite/23_containers/map/modifiers/erase/51142.cc: Likewise.

From-SVN: r181394
2011-11-15 23:28:49 +00:00
Jason Dick 402356d146 re PR libstdc++/51133 (Incorrect implementation of std::tr1::hermite())
2011-11-15  Jason Dick  <dickphd@gmail.com>

	PR libstdc++/51133
	* include/tr1/poly_hermite.tcc (__poly_hermite_recursion): Fix
	wrong sign in recursion relation.

From-SVN: r181381
2011-11-15 10:49:00 +00:00
Paolo Carlini 77addcb730 cmath (frexp, [...]): Do not mark constexpr, not viable anyway due to the pointer parameter.
2011-11-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/c_global/cmath (frexp, modf, remquo): Do not mark constexpr,
	not viable anyway due to the pointer parameter.

From-SVN: r181349
2011-11-14 11:29:26 +00:00
Paolo Carlini 9fb2982817 cmath (atan2, [...]): Simplify constraining on the return type.
2011-11-13  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/c_global/cmath (atan2, fmod, pow, copysign, fdim,
	fma, fmax, fmin, hypot, nextafter, remainder, remquo): Simplify
	constraining on the return type.
	* include/tr1/cmath (copysign, fdim, fma, fmax, fmin, hypot,
	nextafter, remainder, remquo): Likewise.

From-SVN: r181341
2011-11-13 23:51:42 +00:00
Gerald Pfeifer afe5cf2190 * using.xml: Use GNU/Linux.
From-SVN: r181333
2011-11-13 04:27:22 +00:00
Jason Merrill d0ad58f94e re PR c++/51060 (Temporary object stack space is not re-used)
PR c++/51060
	* gimplify.c (gimplify_target_expr): Add a clobber to the cleanup.
	(gimplify_modify_expr): Don't try to simplify it.
	* cp/cp-gimplify.c (cp_gimplify_expr): Leave clobbers alone.

From-SVN: r181332
2011-11-12 19:44:39 -05:00
Jonathan Wakely 306133e3d4 re PR libstdc++/51083 (TR1 [tr.c99.cmath.over] and C++11 [cmplx.over] overloads not constrained)
PR libstdc++/51083
	* include/ext/type_traits.h (__promote): Only define __type member
	for integral and floating point types, to prevent math functions
	participating in overload resolution for other types.
	(__promote_2, __promote_3, __promote_4): Use __promote in default
	template argument values, so deduction only succeeds for integral and
	floating point types.
	* testsuite/26_numerics/cmath/51083.cc: New.
	* testsuite/26_numerics/complex/51083.cc: New.
	* testsuite/tr1/8_c_compatibility/cmath/51083.cc: New.
	* testsuite/tr1/8_c_compatibility/complex/51083.cc: New.

From-SVN: r181321
2011-11-12 15:57:03 +00:00
Andrew MacLeod d660c35ea2 re PR middle-end/51038 (29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc)
PR middle-end/51038

	libstdc++-v3
	* include/bits/atomic_base.h (atomic_thread_fence): Call built-in.
	(atomic_signal_fence): Call built-in.
	(test_and_set, clear): Call new atomic built-ins.

	gcc
	* builtins.c (expand_builtin_atomic_clear): New.  Expand atomic_clear.
	(expand_builtin_atomic_test_and_set): New.  Expand atomic test_and_set.
	(expand_builtin): Add cases for test_and_set and clear.
	* sync-builtins.def (BUILT_IN_ATOMIC_TEST_AND_SET): New.
	(BUILT_IN_ATOMIC_CLEAR): New.

	testsuite
	* gcc.dg/atomic-invalid.c: Add test for invalid __atomic_clear models.
	* gcc.dg/atomic-flag.c: New.  Test __atomic_test_and_set and
	__atomic_clear.

From-SVN: r181271
2011-11-10 20:38:33 +00:00
Jonathan Wakely 5ed56cbbee allocator.h (__shrink_to_fit_aux::_S_do_it): Create the new object with the same allocator.
* include/bits/allocator.h (__shrink_to_fit_aux::_S_do_it): Create
	the new object with the same allocator.
	* testsuite/23_containers/vector/capacity/shrink_to_fit2.cc: New.

From-SVN: r181235
2011-11-09 21:14:03 +00:00
Jonathan Wakely 6c23509047 unordered_map: Add missing copy constructors.
* include/profile/unordered_map: Add missing copy constructors.
	* include/profile/unordered_set: Likewise.

From-SVN: r181196
2011-11-09 08:23:30 +00:00
Dodji Seketeli bd0424fa93 PR c++/51027 - accepts alias-declaration without ';'
gcc/cp/

	* parser.c (cp_parser_alias_declaration): Require ';' at the end
	of the declaration.

libstdc++-v3/

	* include/ext/pointer.h (rebind): Append missing ';'.

gcc/testsuite

	* g++.dg/cpp0x/alias-decl-12.C: New test.
	* g++.dg/ext/alias-decl-attr4.C: Append missing ';'.

From-SVN: r181195
2011-11-09 09:00:58 +01:00
Jonathan Wakely 425006751b stl_vector.h (vector::_Alloc_traits): Make private.
* include/bits/stl_vector.h (vector::_Alloc_traits): Make private.
	* include/debug/vector: Add allocator-extended constructors, ensure
	move assignment and swap have same allocator propagation semantics
	and exceptions specification as base class.
	* include/profile/vector: Likewise.
	(vector::push_back(_Tp&&)): Forward argument as rvalue.
	* testsuite/23_containers/vector/debug/alloc_prop.cc: New.
	* doc/xml/manual/status_cxx2011.xml: Clarify status of container
	requirements with respect to allocators.
	(status.iso.200x): Add anchor for old ID to preserve existing links.

From-SVN: r181189
2011-11-09 01:26:04 +00:00
Jonathan Wakely a58a38b32c shared_ptr_base.h (_Sp_counted_ptr): Make 'final'.
* include/bits/shared_ptr_base.h (_Sp_counted_ptr): Make 'final'.
	(_Sp_counted_deleter): Make 'final'. Use allocator_traits.
	(_Sp_counted_ptr_inplace): Make 'final'. Use allocator_traits.
	Derive from _Sp_counted_ptr instead of _Sp_counted_deleter to use EBO
	for the allocator.
	(__shared_count, __shared_ptr): Use allocator_traits.
	* include/std/future (__future_base::_Result_alloc): Make 'final'. Use
	allocator traits.
	(__future_base::_Task_state): Make 'final'.
	(__future_base::_Deferred_state): Likewise.
	(__future_base::_Async_state): Likewise.
	* testsuite/20_util/shared_ptr/cons/alloc_min.cc: New.
	* testsuite/20_util/shared_ptr/creation/alloc_min.cc: New.
	* testsuite/20_util/shared_ptr/creation/private.cc: New.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust line numbers.
	* testsuite/30_threads/packaged_task/cons/alloc_min.cc: New.
	* testsuite/30_threads/promise/cons/alloc_min.cc: New.

From-SVN: r181171
2011-11-08 16:45:54 +00:00
Paolo Carlini dbe175248f acinclude.m4 ([GLIBCXX_ENABLE_VISIBILITY]): Rename to [GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY]...
2011-11-08  Paolo Carlini  <paolo.carlini@oracle.com>

	* acinclude.m4 ([GLIBCXX_ENABLE_VISIBILITY]): Rename to
	[GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY], likewise for the
	option itself, to --enable-libstdcxx-visibility.
	* configure.ac: Adjust call.
	* doc/xml/manual/configure.xml: Update.
	* configure: Regenerate.

From-SVN: r181162
2011-11-08 14:07:27 +00:00
Paolo Carlini a0eabe5751 macros.cc: Avoid -Wall warnings.
2011-11-08  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/29_atomics/headers/atomic/macros.cc: Avoid -Wall
	warnings.
	* testsuite/29_atomics/atomic/cons/user_pod.cc: Likewise.

From-SVN: r181159
2011-11-08 12:34:40 +00:00
Jonathan Wakely 4e68a06c03 re PR libstdc++/51018 (Test failures on NetBSD)
PR libstdc++/51018
	* testsuite/30_threads/thread/native_handle/typesizes.cc: Do not run
	on netbsd.

From-SVN: r181156
2011-11-08 12:02:26 +00:00
Aldy Hernandez 0a35513e4e Merge from transactional-memory branch.
From-SVN: r181154
2011-11-08 11:13:41 +00:00
Paolo Carlini e65cf3bc2d re PR libstdc++/51018 (Test failures on NetBSD)
2011-11-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/51018
	* include/profile/impl/profiler_node.h (__stack_hash::
	operator()(__stack_t)): Just use std::size_t everywhere.

From-SVN: r181147
2011-11-08 01:39:44 +00:00
Jonathan Wakely c4d9f41936 future (__future_base::_Ptr): Use alias-declaration.
* include/std/future (__future_base::_Ptr): Use alias-declaration.
	(__is_same_pkgdtask): Rename to __constrain_pkgdtask and use decay
	instead of remove_reference so that cv-quals are removed.

From-SVN: r181145
2011-11-08 01:23:53 +00:00
Ed Smith-Rowland 029ac5f967 stdc++.h: Add cstdalign.
2011-11-08  Ed Smith-Rowland  <3dw4rd@verizon.net>

	* include/precompiled/stdc++.h: Add cstdalign.

From-SVN: r181142
2011-11-08 01:02:06 +00:00
Paolo Carlini 31de4ba7df complex (complex<>::real(), [...]): Remove redundant const qualifiers.
2011-11-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/complex (complex<>::real(), complex<>::imag()):
	Remove redundant const qualifiers.

From-SVN: r181141
2011-11-08 00:49:47 +00:00
Jonathan Wakely 7579d15b58 ptr_traits.h (__rebind): Replace with...
* include/bits/ptr_traits.h (__rebind): Replace with...
	(rebind): Implement using alias-declaration.
	* include/ext/pointer.h (__rebind): Replace with...
	(rebind): Implement using alias-declaration.
	* include/bits/alloc_traits.h (__rebind_alloc, __rebind_traits):
	Replace with...
	(rebind_alloc, rebind_traits): Implement using alias-declaration.
	* include/ext/alloc_traits.h (rebind): Use rebind_alloc instead of
	__rebind_alloc.
	* include/std/scoped_allocator (rebind): Likewise.

From-SVN: r181139
2011-11-08 00:33:45 +00:00
Jonathan Wakely 48d8dd06b0 mutex (call_once): Store closure in __once_functor as bound function wrapper might not be copyable.
* include/std/mutex (call_once): Store closure in __once_functor
	as bound function wrapper might not be copyable.

From-SVN: r181128
2011-11-07 22:26:15 +00:00
Andrew MacLeod 6577e39c94 atomic_base.h (atomic_thread_fence): Revert.
2011-11-07  Andrew MacLeod  <amacleod@redhat.com>

	* include/bits/atomic_base.h (atomic_thread_fence): Revert.
	(atomic_signal_fence): Revert.

From-SVN: r181119
2011-11-07 21:32:52 +00:00
Andrew MacLeod 0669295b1e atomic_base.h (atomic_thread_fence): Call builtin.
2011-11-07  Andrew MacLeod  <amacleod@redhat.com>

	libstdc++-v3
	* include/bits/atomic_base.h (atomic_thread_fence): Call builtin.
	(atomic_signal_fence): Call builtin.
	(atomic_flag::test_and_set): Call __atomic_exchange when it is lockfree,
	otherwise fall back to call __sync_lock_test_and_set.
	(atomic_flag::clear): Call __atomic_store when it is lockfree,
	otherwise fall back to call __sync_lock_release.

	gcc
	* doc/extend.texi: Docuemnt behaviour change for __atomic_exchange and
	__atomic_store.
	* optabs.c (expand_atomic_exchange): Expand to __sync_lock_test_and_set
	only when originated from that builtin.
	(expand_atomic_store): Expand to __sync_lock_release when originated
	from that builtin.
	* builtins.c (expand_builtin_sync_lock_test_and_set): Add flag that
	expand_atomic_exchange call originated from here.
	(expand_builtin_sync_lock_release): Add flag that expand_atomic_store
	call originated from here.
	(expand_builtin_atomic_exchange): Add origination flag.
	(expand_builtin_atomic_store): Add origination flag.
	* expr.h (expand_atomic_exchange, expand_atomic_store): Add boolean 
	parameters to indicate implementation fall back options.

From-SVN: r181111
2011-11-07 20:06:39 +00:00
Rainer Orth 9fbcc75d56 Return gthr-posix.h to libgcc (PR bootstrap/50982)
libgcc:
	PR bootstrap/50982
	* config/gthr-posix.h: Move ...
	* gthr-posix.h: ... here.
	* config/gthr-lynx.h: Reflect this.
	* config/gthr-vxworks.h: Likewise.
	* config/rs6000/gthr-aix.h: Likewise.
	* configure.ac (target_thread_file): Likewise.
	* configure: Regenerate.

	libstdc++-v3:
	PR bootstrap/50982
	* include/Makefile.am (${host_builddir}/gthr-posix.h): Reflect
	gthr-posix.h move.
	* include/Makefile.in: Regenerate.

From-SVN: r181095
2011-11-07 16:34:31 +00:00
Jonathan Wakely 5ee360d069 acinclude.m4 (GLIBCXX_CHECK_SC_NPROC_ONLN): Define.
* acinclude.m4 (GLIBCXX_CHECK_SC_NPROC_ONLN): Define.
	(GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP): Define.
	(GLIBCXX_CHECK_SYSCTL_HW_NCPU): Define.
	* configure.ac: Use new checks.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* src/thread.cc: Check new config macros.
	* testsuite/lib/libstdc++.exp: Likewise.

From-SVN: r181084
2011-11-07 13:45:03 +00:00
Jonathan Wakely 3cc227e5bf * config/abi/pre/gnu.ver: Fix exports for string::pop_back.
From-SVN: r181081
2011-11-07 11:36:04 +00:00
Jonathan Wakely e0f0ee74f0 acinclude.m4: Check for <stdalign.h>
* acinclude.m4: Check for <stdalign.h>
	* configure: Regenerate.
	* config.h.in: Likewise.
	* include/Makefile.am: Add <cstdalign>.
	* include/Makefile.in: Regenerate.
	* include/c_global/cstdalign: New.
	* testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: New.
	* doc/xml/manual/backwards_compatibility.xml: Update.
	* doc/xml/manual/status_cxx2011.xml: Update.

From-SVN: r181076
2011-11-07 08:46:58 +00:00
Jonathan Wakely ff02a38bc6 re PR libstdc++/50982 (AIX libstdc++ GTHREADS incompatibility)
PR libstdc++/50982
	* include/std/mutex (__once_proxy): Use void parameter list to
	work on implicit extern "C" systems.

From-SVN: r181072
2011-11-07 07:54:06 +00:00
Xinliang David Li b9b8c6ae39 make __stl_prime_list in comdat
From-SVN: r181071
2011-11-07 07:43:46 +00:00
Jonathan Wakely f1e09f0d14 basic_string.h (basic_string::at): Move adjacent to other overload.
* include/bits/basic_string.h (basic_string::at): Move adjacent to other
	overload.
	(basic_string::pop_back): Define.
	* include/debug/string (__gnu_debug::basic_string::pop_back): Likewise.
	* include/ext/vstring.h (__versa_string::pop_back): Likewise.
	* config/abi/pre/gnu.ver: Add new symbols.
	* testsuite/21_strings/basic_string/modifiers/char/pop_back.cc: New.
	* testsuite/21_strings/basic_string/modifiers/wchar_t/pop_back.cc: New.
	* testsuite/21_strings/basic_string/range_access.cc: Split to ...
	* testsuite/21_strings/basic_string/range_access/char/1.cc: Here and ...
	* testsuite/21_strings/basic_string/range_access/wchar_t/1.cc: Here.
	* testsuite/ext/vstring/modifiers/char/pop_back.cc: New.
	* testsuite/ext/vstring/modifiers/wchar_t/pop_back.cc: New.

From-SVN: r181049
2011-11-07 00:06:23 +00:00
Jonathan Wakely 55d2e499d6 backwards_compatibility.xml: Fix autoconf tests for C++11 compiler features and library headers.
* doc/xml/manual/backwards_compatibility.xml: Fix autoconf tests for
	C++11 compiler features and library headers. Add stable id
	attributes. Use <filename> element for headers and surround in angle
	brackets. Use <classname> for classes.
	* doc/html/*: Regenerate.

From-SVN: r181047
2011-11-06 23:25:25 +00:00
Jonathan Wakely 57899d2fc5 status_cxx2011.xml: Document <cuchar> and <cstdalign> as missing.
* doc/xml/manual/status_cxx2011.xml: Document <cuchar> and
	<cstdalign> as missing.

From-SVN: r181045
2011-11-06 22:10:41 +00:00
Jonathan Wakely f25481f470 faq.xml: Replace references to C++0x with C++11.
* doc/xml/faq.xml: Replace references to C++0x with C++11.
	* doc/xml/manual/intro.xml: Likewise.
	* doc/xml/manual/backwards_compatibility.xml: Likewise.
	* doc/xml/manual/shared_ptr.xml: Likewise.
	* doc/xml/manual/configure.xml: Likewise.
	* doc/xml/manual/evolution.xml: Likewise.
	* doc/xml/manual/using.xml: Likewise.
	* doc/xml/manual/strings.xml: Likewise.
	* doc/xml/manual/debug_mode.xml: Likewise.
	* doc/xml/manual/policy_data_structures.xml: Likewise.
	* doc/xml/manual/extensions.xml: Likewise.
	* doc/xml/manual/diagnostics.xml: Likewise.
	* doc/xml/manual/test.xml: Likewise.
	* doc/xml/manual/status_cxx200x.xml: Likewise, and rename to...
	* doc/xml/manual/status_cxx2011.xml: Here.
	* doc/Makefile.am: Rename status_cxx200x.xml.
	* doc/Makefile.in: Regenerate.
	* doc/html/*: Regenerate.

From-SVN: r181041
2011-11-06 20:15:53 +00:00
François Dumont ba3aa0e6c7 41975.cc: Add tests to check performance with or without cache of hash code and with...
2011-11-06  François Dumont <fdumont@gcc.gnu.org>

	* testsuite/performance/23_containers/insert_erase/41975.cc: Add
	tests to check performance with or without cache of hash code and with
	string type that has a costlier hash functor than int type.

From-SVN: r181037
2011-11-06 17:16:00 +00:00
Andrew Macleod 86951993f8 Check in patch/merge from cxx-mem-model Branch
From-SVN: r181031
2011-11-06 14:55:48 +00:00
Jonathan Wakely e940f96ffc * doc/xml/manual/test.xml: Fix dg-warning examples.
From-SVN: r181023
2011-11-06 00:51:17 +00:00
Jonathan Wakely 7c09269050 re PR libstdc++/44436 ([C++0x] Implement emplace* in associative containers)
PR libstdc++/44436
	* doc/xml/manual/status_cxx200x.xml: Document emplace members are
	missing.

From-SVN: r181022
2011-11-06 00:29:36 +00:00
Jonathan Wakely eed33268ff re PR libstdc++/49894 ([C++0x] Uniform initialization in constructor)
PR libstdc++/49894
	PR bootstrap/50982
	* include/std/mutex (once_flag): Use NSDMI.

From-SVN: r181013
2011-11-05 13:33:29 +00:00
Benjamin Kosnik 801fe0bb11 run_doxygen: Fix sed quoting.
2011-11-04  Benjamin Kosnik  <bkoz@redhat.com>

	* scripts/run_doxygen: Fix sed quoting.

From-SVN: r180978
2011-11-04 19:39:23 +00:00
Benjamin Kosnik c3b0bfe175 doxygroups.cc: Add markup for namespace tr2.
2011-11-03  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/doxygen/doxygroups.cc: Add markup for namespace tr2.
	* include/tr2/bool_set: Adjust doxygen markup.
	* include/tr2/dynamic_bitset: Same.
	* include/tr2/type_traits: Same.

From-SVN: r180874
2011-11-03 22:23:35 +00:00
Benjamin Kosnik b22e43930f *: Regenerate.
2011-11-03  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/html/*: Regenerate.

From-SVN: r180837
2011-11-03 17:50:14 +00:00
Richard B. Kreckel 7f9876b26c re PR libstdc++/50880 (__complex_acosh() picks wrong complex branch)
2011-11-02  Richard B. Kreckel  <kreckel@ginac.de>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50880
	* include/std/complex (__complex_acosh): Fix in a better way,
	use Kahan's formula.
	* include/tr1/complex (__complex_acosh): Likewise.

From-SVN: r180788
2011-11-02 18:43:42 +00:00
Richard B. Kreckel af7c185869 re PR libstdc++/50880 (__complex_acosh() picks wrong complex branch)
2011-11-02  Richard B. Kreckel  <kreckel@ginac.de>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50880
	* include/std/complex (__complex_acosh): Fix in a better way,
	use Kahan's formula.
	* include/tr1/complex (__complex_acosh): Likewise.

From-SVN: r180787
2011-11-02 18:43:26 +00:00
Rainer Orth 5d1c8e77cf Move gthr to toplevel libgcc
gcc:
	* gthr-single.h, gthr.h: Move to ../libgcc.
	* gthr-aix.h: Move to ../libgcc/config/rs6000.
	* gthr-dce.h: Move to ../libgcc/config/pa.
	* gthr-lynx.h: Move to ../libgcc/config.
	* gthr-mipssde.h: Move to ../libgcc/config/mips.
	* gthr-posix.h: Move to ../libgcc/config.
	* gthr-rtems.h: Likewise.
	* gthr-tpf.h: Move to ../libgcc/config/s390.
	* gthr-vxworks.h: Move to ../libgcc/config.
	* gthr-win32.h: Move to ../libgcc/config/i386.
	* configure.ac (gthread_flags): Remove
	(gthr-default.h): Don't create.
	(thread_file): Don't substitute.
	* configure: Regenerate.
	* Makefile.in (GCC_THREAD_FILE): Remove.
	(GTHREAD_FLAGS): Remove.
	(libgcc.mvars): Remove GTHREAD_FLAGS.
	* config/t-vxworks (EXTRA_HEADERS): Remove.

	gcc/po:
	* EXCLUDES (gthr-aix.h, gthr-dce.h, gthr-posix.c, gthr-posix.h)
	(gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h)
	(gthr-win32.h, gthr.h): Remove.

	libgcc:
	* gthr-single.h, gthr.h: New files.
	* config/gthr-lynx.h, config/gthr-posix.h., config/gthr-rtems.h,
	config/gthr-vxworks.h, config/i386/gthr-win32.h,
	config/mips/gthr-mipssde.h, config/pa/gthr-dce.h,
	config/rs6000/gthr-aix.h, config/s390/gthr-tpf.h: New files.
	* config/i386/gthr-win32.c: Include "gthr-win32.h".
	* configure.ac (thread_header): New variable.
	Set it depending on target_thread_file.
	(gthr-default.h): Link from $thread_header.
	* configure: Regenerate.
	* Makefile.in (LIBGCC2_CFLAGS): Remove $(GTHREAD_FLAGS).

	libgfortran:
	* Makefile.am (AM_CPPFLAGS): Add
	-I$(srcdir)/$(MULTISRCTOP)../libgcc, -I$(MULTIBUILDTOP)../libgcc.
	* Makefile.in: Regenerate.
	* acinclude.m4 (LIBGFOR_CHECK_GTHR_DEFAULT): Remove.
	* configure.ac (LIBGFOR_CHECK_GTHR_DEFAULT): Likewise.
	* configure: Regenerate.
	* config.h.in: Regenerate.

	libobjc:
	* Makefile.in (INCLUDES): Add -I$(MULTIBUILDTOP)../libgcc.
	* configure.ac (target_thread_file, HAVE_GTHR_DEFAULT): Remove.
	* configure: Regenerate.
	* config.h.in: Regenerate.

	libstdc++-v3:
	* acinclude.m4 (GLIBCXX_CONFIGURE): Determine and substitute
	toplevel_builddir.
	(GLIBCXX_ENABLE_THREADS): Remove glibcxx_thread_h,
	HAVE_GTHR_DEFAULT, enable_thread.
	(GLIBCXX_CHECK_GTHREADS): Reflect gthr move to libgcc.
	* include/Makefile.am (thread_host_headers): Remove
	${host_builddir}/gthr-tpf.h.
	(${host_builddir}/gthr.h): Reflect gthr move to libgcc.
	Use $<.
	(${host_builddir}/gthr-single.h): Likewise.
	(${host_builddir}/gthr-posix.h): Likewise.
	(${host_builddir}/gthr-tpf.h): Remove.
	(${host_builddir}/gthr-default.h): Likewise.
	* configure, config.h.in: Regenerate.
	* Makefile.in, doc/Makefile.in, include/Makefile.in,
	libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in,
	src/Makefile.intestsuite/Makefile.in: Regenerate.

From-SVN: r180776
2011-11-02 15:28:43 +00:00
Paolo Carlini 3164517929 re PR libstdc++/50951 (state of subtract_with_carry_engine not saved correctly to output stream)
2011-11-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50951
	* include/bits/random.tcc (operator<<(basic_ostream<>&,
	const mersenne_twister_engine<>&): Output _M_p too.
	(operator<<(basic_ostream<>&, const
	subtract_with_carry_engine<>&): Likewise.
	(operator>>(basic_istream<>&, mersenne_twister_engine<>&):
	Reload it.
	(operator>>(basic_istream<>&, subtract_with_carry_engine<>&):
	Likewise.
	* include/bits/random.h (mersenne_twister_engine<>::operator==):
	Compare _M_p too.
	(subtract_with_carry_engine<>::operator==): Compare _M_carry
	and _M_p too.
	(shuffle_order_engine<>::operator==): Compare _M_v(s) and _M_y too.
	* testsuite/26_numerics/random/independent_bits_engine/
	operators/serialize.cc: Extend.
	* testsuite/26_numerics/random/subtract_with_carry_engine/
	operators/serialize.cc: Likewise.
	* testsuite/26_numerics/random/discard_block_engine/
	operators/serialize.cc: Likewise.
	* testsuite/26_numerics/random/mersenne_twister_engine/
	operators/serialize.cc: Likewise.
	* testsuite/26_numerics/random/linear_congruential_engine/
	operators/serialize.cc: Likewise.
	* testsuite/26_numerics/random/shuffle_order_engine/
	operators/serialize.cc: Likewise.

From-SVN: r180764
2011-11-02 10:06:08 +00:00
Benjamin Kosnik 08624e906d c++config: Add tr2 to versioned namespaces.
2011-11-02  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/c++config: Add tr2 to versioned namespaces.
	* scripts/run_doxygen: Adjust generated man files as well.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust line numbers.

From-SVN: r180760
2011-11-02 04:23:33 +00:00
Jonathan Wakely 376d7c51ec future (promise): Add constructors for uses-allocator construction from rvalue promise.
* include/std/future (promise): Add constructors for uses-allocator
	construction from rvalue promise.
	(packaged_task): Implement LWG 2067. Add additional constructors for
	uses-allocator construction.
	* testsuite/30_threads/packaged_task/cons/3.cc: New.
	* testsuite/30_threads/packaged_task/cons/alloc2.cc: New.
	* testsuite/30_threads/promise/cons/alloc2.cc: New.

From-SVN: r180757
2011-11-02 00:53:12 +00:00
Jason Merrill a7d5d7e221 Makefile.am (install-freestanding-headers): Install c++0x_warning.h.
* include/Makefile.am (install-freestanding-headers): Install
	c++0x_warning.h.
	* libsupc++/initializer_list: Include it.

From-SVN: r180727
2011-11-01 00:02:45 -04:00
Gerald Pfeifer 176d6eb070 acinclude.m4 (GLIBCXX_CONFIGURE): Refer to GNU/Linux.
* acinclude.m4 (GLIBCXX_CONFIGURE): Refer to GNU/Linux.
	* configure: Regenerate.

From-SVN: r180717
2011-11-01 00:02:45 +00:00
Jason Merrill 97e3ad20b1 re PR c++/50920 (add a -std=c++11 option to the driver)
PR c++/50920
gcc/c-family
	* c-common.h (cxx_dialect): Add cxx11 and cxx03.
	* c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
	and -Wc++11-compat.
	* c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
gcc/cp
	* class.c (check_field_decl): Change c++0x in diags to c++11.
	* error.c (maybe_warn_cpp0x): Likewise.
	* parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
	* pt.c (check_default_tmpl_args): Likewise.
libcpp
	* include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
	CLK_GNUCXX0X to CLK_GNUCXX11.
libstdc++-v3
	* include/bits/c++0x_warning.h: Change -std=c++0x to -std=c++11.

From-SVN: r180707
2011-10-31 15:34:14 -04:00
Gerald Pfeifer 845f6341a3 prerequisites.xml: Refer to GCC (instead of gcc) and GNU/Linux.
* prerequisites.xml: Refer to GCC (instead of gcc) and GNU/Linux.
	Remove an obsolete reference to a Red Hat release we do not
	support any longer.
	Refer to Debian GNU/Linux.

From-SVN: r180681
2011-10-30 15:33:11 +00:00
Gerald Pfeifer 391190a3f0 faq.xml (Who's in charge of it?): Refer to the Linux kernel instead of just Linux.
* faq.xml (Who's in charge of it?): Refer to the Linux kernel
	instead of just Linux.
	(How do I install libstdc++?): Refer to GNU/Linux instead of
	just Linux.

From-SVN: r180679
2011-10-30 14:29:15 +00:00
Paolo Carlini e8a25ac83c 50862.cc: Trivial formatting fixes.
2011-10-28  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/30_threads/condition_variable_any/50862.cc: Trivial
	formatting fixes.

From-SVN: r180617
2011-10-28 14:33:21 +00:00
Paolo Carlini 4a6b297c98 count.cc: New.
2011-10-28  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/unordered_map/operations/count.cc: New.
	* testsuite/23_containers/multimap/operations/count.cc: Likewise.
	* testsuite/23_containers/set/operations/count.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/operations/count.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/operations/count.cc: Likewise.
	* testsuite/23_containers/multiset/operations/count.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/operations/count.cc:
	Likewise.
	* testsuite/23_containers/map/operations/count.cc: Likewise.

From-SVN: r180612
2011-10-28 11:54:04 +00:00
Richard B. Kreckel 4c16fa7714 complex (__complex_acosh): Just use '< _Tp()'.
2011-10-28  Richard B. Kreckel  <kreckel@ginac.de>

	* include/std/complex (__complex_acosh): Just use '< _Tp()'.
	* include/tr1/complex (__complex_acosh): Likewise.

From-SVN: r180607
2011-10-28 09:34:52 +00:00
Richard B. Kreckel 259f206328 re PR libstdc++/50880 (__complex_acosh() picks wrong complex branch)
2011-10-27  Richard B. Kreckel  <kreckel@ginac.de>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50880
	* include/std/complex (__complex_acosh): Fix for __z.real() < 0.
	* include/tr1/complex (__complex_acosh): Likewise.
	* testsuite/26_numerics/complex/50880.cc: New.
	* testsuite/tr1/8_c_compatibility/complex/50880.cc: Likewise.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r180563
2011-10-27 11:00:25 +00:00
Jonathan Wakely 28c2f60e96 re PR libstdc++/50862 (deadlock in std::condition_variable_any)
PR libstdc++/50862
	* include/std/condition_variable (condition_variable_any::wait): Avoid
	terminating if relocking user mutex throws during stack-unwinding.
	* testsuite/30_threads/condition_variable_any/50862.cc: Add dg-require.

From-SVN: r180549
2011-10-27 00:35:26 +01:00
Paolo Carlini 7f808cadda 2011-10-26 Paolo Carlini <paolo.carlini@oracle.com>
* Tweak last ChangeLog entry.

From-SVN: r180532
2011-10-26 18:04:57 +00:00
Jonathan Wakely 0fd72195bc condition_variable (condition_variable_any): Remove unused native_handle_type typedef.
* include/std/condition_variable (condition_variable_any): Remove
	unused native_handle_type typedef.
	* src/condition_variable.cc (condition_variable): Add missing noexcept
	specifications.
	* 30_threads/condition_variable_any/requirements/typedefs.cc: Remove.

From-SVN: r180454
2011-10-25 22:44:12 +01:00
Jonathan Wakely 5d020aa222 re PR libstdc++/50862 (deadlock in std::condition_variable_any)
PR libstdc++/50862
	* include/std/condition_variable (condition_variable_any::wait): Fix
	deadlock and ensure _Lock::lock() is called on exit.
	(condition_variable_any::native_handle): Remove, as per LWG 1500.
	* testsuite/30_threads/condition_variable_any/50862.cc: New.

From-SVN: r180446
2011-10-25 21:56:43 +01:00
Jonathan Wakely b81e920eac re PR libstdc++/49894 ([C++0x] Uniform initialization in constructor)
PR libstdc++/49894
	* include/std/mutex (__mutex_base,__recursive_mutex_base): Define new
	base classes to manage construction/destruction of native mutexes,
	using NSDMI when INIT macros are defined.
	(mutex,recursive_mutex,timed_mutex,recursive_timed_mutex): Derive from
	new base classes.
	* include/std/condition_variable (condition_variable): Use NSDMI when
	INIT macro is defined. Use noexcept.
	* src/condition_variable.cc (condition_variable): Explicitly-default
	constructor/destructor when using NSDMI. Use noexcept.
	(condition_variable_any): Likewise.

From-SVN: r180411
2011-10-25 00:26:25 +01:00
Jonathan Wakely d41c3b8947 49668.cc: Add missing dg-require.
* testsuite/30_threads/async/49668.cc: Add missing dg-require.
	* testsuite/30_threads/packaged_task/49668.cc: Likewise.

From-SVN: r180400
2011-10-24 20:11:31 +01:00
Jonathan Wakely ec8ab7c4e4 re PR libstdc++/50834 (Documentation about STL thread safety is ambiguous)
PR libstdc++/50834
	* doc/xml/manual/using.xml: Update thread safety docs w.r.t. C++11.

From-SVN: r180359
2011-10-24 01:19:56 +01:00
Jonathan Wakely 3b2eeb43cf re PR libstdc++/50196 ([C++0x] std::thread not available under macos)
PR libstdc++/50196
	* acinclude.m4 (GLIBCXX_HAS_GTHREADS): Don't depend on _POSIX_TIMEOUTS.
	* configure: Regenerate.
	* include/std/mutex (timed_mutex, recursive_timed_mutex): Define
	conditionally on GTHREADS_HAS_MUTEX_TIMEDLOCK.
	* testsuite/lib/libstdc++.exp (check_v3_target_gthreads_timed): Define.
	* testsuite/lib/dg-options.exp (dg-require-gthreads-timed): Define.
	* testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
	Use dg-require-gthreads-timed instead of dg-require-gthreads.
	* testsuite/30_threads/recursive_timed_mutex/native_handle/
	typesizes.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/requirements/typedefs.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
	Likewise.
	* testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise.
	* testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Likewise.
	* testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Likewise.
	* testsuite/30_threads/timed_mutex/requirements/standard_layout.cc:
	Likewise.
	* testsuite/30_threads/timed_mutex/requirements/typedefs.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/4.cc: Likewise.

From-SVN: r180329
2011-10-22 22:31:24 +01:00
Benjamin Kosnik 24ef84f6c3 [multiple changes]
2011-10-19  Ed Smith-Rowland  <3dw4rd@verizon.net>

	* include/tr2/bool_set (bool_set): New.
	* include/tr2/bool_set.tcc: New.
	* include/tr2/dynamic_bitset (dynamic_bitset): New.
	* include/tr2/ratio (kibi, mebi, gibi, tebi, pebi, exbi): New.
	* include/Makefile.am: Add files.
	* include/Makefile.in: Regenerate.

2011-10-19  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/doxygen/user.cfg.in: Add tr2 files.
	* testsuite/tr2/headers/all.cc: New.
	* testsuite/tr2/headers/using_namespace_std_tr2.cc: New.

	* include/tr2/type_traits: Tweak.

From-SVN: r180211
2011-10-19 22:05:26 +00:00
Jason Merrill a2e70335e2 re PR c++/50500 ([C++0x] [DR 1082] move constructor should cause copy constructor to be deleted, but still declared)
PR c++/50500
	DR 1082
	* class.c (type_has_user_declared_move_constructor): New.
	(type_has_user_declared_move_assign): New.
	(add_implicitly_declared_members): Add lazy copy ops
	even if there's a move.
	* method.c (lazily_declare_fn): Delete implicit copies
	if there's a move.
	(maybe_explain_implicit_delete): Explain this.  Use inform rather
	than error.
	* cp-tree.h: Declare new fns.

From-SVN: r180159
2011-10-18 13:39:15 -04:00
Benjamin Kosnik 4daba88481 [multiple changes]
2011-10-17  Michael Spertus  <mike_spertus@symantec.com>

	* gcc/c-family/c-common.c (c_common_reswords): Add __bases,
	__direct_bases.
	* gcc/c-family/c-common.h: Add RID_BASES and RID_DIRECT_BASES.

2011-10-17  Michael Spertus  <mike_spertus@symantec.com>

	* cp-tree.def: Add BASES as a new tree code.
	* cp-tree.h (enum cp_trait_kind): Add CPTK_BASES, CPTK_DIRECT_BASES.
	(BASES_TYPE, BASES_DIRECT): Define.
	(calculate_bases, finish_bases, calculate_direct_bases): Declare.
	* parser.c (cp_parser_trait_expr, cp_parser_template_argument_list,
	(cp_parser_simple_type_specifier, cp_parser_save_nsdmi): Use them.
	* pt.c (find_parameter_packs_r, tsubst_pack_expansion): Likewise.
	* semantics.c (calculate_bases, finish_bases, calculate_direct_bases,
	dfs_calculate_bases_pre, dfs_calculate_bases_post,
	calculate_bases_helper): Define.

2011-10-17  Michael Spertus  <mike_spertus@symantec.com>

	* g++.dg/ext/bases.C: New test.

2011-10-17  Michael Spertus  <mike_spertus@symantec.com>

	* include/tr2/type_traits (bases, direct_bases, typelist): New.

2011-10-17  Benjamin Kosnik  <bkoz@redhat.com>

	* libstdc++-v3/include/Makefile.am: Add tr2 directory and includes.
	* libstdc++-v3/include/Makefile.in: Regenerate.

	* scripts/create_testsuite_files: Search tr2 directory.
	* testsuite/libstdc++-dg/conformance.exp: Same.

	* testsuite/tr2/bases/requirements/explicit_instantiation.cc: New.
	* testsuite/tr2/bases/requirements/typedefs.cc: New.
	* testsuite/tr2/bases/value.cc: New.
	* testsuite/tr2/direct_bases/requirements/
	explicit_instantiation.cc: New.
	* testsuite/tr2/direct_bases/requirements/typedefs.cc: New.
	* testsuite/tr2/direct_bases/value.cc: New.

From-SVN: r180121
2011-10-18 02:58:06 +00:00
Rainer Orth 47fc10353d Remove duplicate symbol in gnu.ver (PR bootstrap/50715)
PR bootstrap/50715
	* config/abi/pre/gnu.ver (CXXABI_1.3.6): Remove duplicate
	__cxa_get_exception_ptr.

From-SVN: r180097
2011-10-17 15:14:54 +00:00
François Dumont 9918dc0f99 41975.cc: New.
2011-10-14  François Dumont  <francois.cppdevs@free.fr>

	* testsuite/performance/23_containers/insert_erase/41975.cc: New.

From-SVN: r179968
2011-10-14 11:25:27 +00:00
Jonathan Wakely 5fabae4e53 50714.cc: Fix mychar.
2011-10-14  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* testsuite/22_locale/codecvt_byname/50714.cc: Fix mychar.

From-SVN: r179966
2011-10-14 10:38:23 +00:00
Jonathan Yong d7a3ef9794 configure.host: Use config/os/mingw32-w64 instead of config/os/mingw32 if vendor key is "w64".
2011-10-14  Jonathan Yong  <jon_y@users.sourceforge.net>

	* configure.host: Use config/os/mingw32-w64 instead of
	config/os/mingw32 if vendor key is "w64".
	* config/os/mingw32-w64: Duplicate from config/os/mingw32.
	* config/os/mingw32-w64/os_defines.h: Enable
	_GLIBCXX_FULLY_DYNAMIC_STRING if undefined.
	* acinclude.m4: Set fully-dynamic-string to 1 when enabled,
	0 when disabled or undefined if unset by user.
	* include/bits/basic_string.h: Check if
	_GLIBCXX_FULLY_DYNAMIC_STRING is set to 0 instead of undefined.
	include/bits/basic_string.tcc: Likewise.
	* configure: Regenerated.
	* config.h.in: Likewise.

From-SVN: r179961
2011-10-14 08:57:55 +02:00
Paolo Carlini b78eebe4f5 re PR libstdc++/50714 (codecvt_byname::codecvt::_M_c_locale_codecvt not initialized by destroyed)
2011-10-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50714
	* include/bits/codecvt.h (codecvt<>::codecvt(size_t)): Initialize
	_M_c_locale_codecvt member.
	* testsuite/22_locale/codecvt_byname/50714.cc: New.

From-SVN: r179948
2011-10-14 00:12:40 +00:00
Paolo Carlini 578f023490 re PR c++/50594 (Option -fwhole-program discards replaced new operator for std::string)
2011-10-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50594
	* decl.c (cxx_init_decl_processing): Add
	__attribute__((externally_visible)) to operator new and
	operator delete library fn.

2011-10-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50594
	* libsupc++/new (operator new, operator delete): Decorate with
	__attribute__((__externally_visible__)).
	* include/bits/c++config: Add _GLIBCXX_THROW.
	* libsupc++/del_op.cc: Adjust.
	* libsupc++/del_opv.cc: Likewise.
	* libsupc++/del_opnt.cc: Likewise.
	* libsupc++/del_opvnt.cc: Likewise.
	* libsupc++/new_op.cc: Likewise.
	* libsupc++/new_opv.cc: Likewise.
	* libsupc++/new_opnt.cc: Likewise.
	* libsupc++/new_opvnt.cc: Likewise.
	* testsuite/18_support/50594.cc: New.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error
	line number.

From-SVN: r179863
2011-10-12 18:40:58 +00:00
Emil Wojak 92b2342a6e re PR libstdc++/50661 (std::equal should use more efficient version for arrays of pointers)
2011-10-11  Emil Wojak  <emil@wojak.eu>

	PR c++/50661
	* include/bits/stl_algobase.h (equal): Compare arrays of pointers
	too with memcmp.

From-SVN: r179801
2011-10-11 12:39:18 +00:00
Benjamin Kosnik 50da34bb1b re PR libstdc++/49818 (libsupc++ does not export __cxa_get_globals or related functions)
2011-10-10  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/49818
	* config/abi/pre/gnu.ver (CXXABI_1.3.6): Add symbols.
	* testsuite/util/testsuite_abi.cc: Same.
	* libsupc++/unwind-cxx.h: Move required eh API...
	* libsupc++/cxxabi.h: ... to here. Add required forward declarations.
	Use _GLIBCXX_NOTHROW.
	* libsupc++/pure.cc (__cxa_deleted_virtual): Add.
	* libsupc++/eh_alloc.cc: Use _GLIBCXX_NOTHROW.
	* libsupc++/eh_catch.cc: Same.
	* libsupc++/eh_globals.cc: Same.
	* libsupc++/eh_type.cc: Same.

From-SVN: r179769
2011-10-10 19:03:39 +00:00
Jonathan Wakely 920a97b75d testsuite_allocator.h (uneq_allocator): Add propagate_on_container_swap typedef for C++0x testing.
2011-10-07  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* testsuite/util/testsuite_allocator.h (uneq_allocator): Add
	propagate_on_container_swap typedef for C++0x testing.

From-SVN: r179665
2011-10-07 16:20:31 +00:00
Paolo Carlini 5847ec9338 assign_neg.cc: Tidy dg- directives, for C++0x testing too.
2011-10-06  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/27_io/ios_base/cons/assign_neg.cc: Tidy dg- directives,
	for C++0x testing too.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.
	* testsuite/ext/pb_ds/example/hash_resize_neg.cc: Likewise.
	* testsuite/24_iterators/istreambuf_iterator/requirements/
	base_classes.cc: Adjust for C++0x testing.
	* testsuite/ext/codecvt/char-1.cc: Avoid warnings in C++0x mode.
	* testsuite/ext/codecvt/char-2.cc: Likewise.
	* testsuite/ext/codecvt/wchar_t.cc: Likewise.

From-SVN: r179616
2011-10-06 14:43:26 +00:00
Paolo Carlini 57d1eadd79 pod_char_traits.h: Avoid warnings in C++0x mode when int_type is unsigned.
2011-10-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/pod_char_traits.h: Avoid warnings in C++0x mode
	when int_type is unsigned.

From-SVN: r179587
2011-10-06 01:41:49 +00:00
Paolo Carlini 0e83f45aa6 re PR libstdc++/49561 ([C++0x] std::list::size complexity)
2011-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/49561
	* include/bits/stl_list.h (_List_base<>::_List_impl::_M_size):
	Add in C++0x mode.
	(_List_base<>::_List_impl, _List_base<>::_M_get_node,
	_List_base<>::_M_put_node, _List_base<>::_List_base(_List_base&&),
	list<>::size, list<>::swap, list<>::splice): Use it.
	(operator==(const list<>&, const list<>&)): Rewrite in C++0x mode.
	* include/bits/list.tcc (list<>::erase): Likewise.
	(list<>::merge): Adjust in C++0x mode.
	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
	Adjust dg-error line number.
	* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_2_neg.cc: Likewise.

From-SVN: r179528
2011-10-04 22:19:44 +00:00
Paolo Carlini 6caf3f7f12 48698.cc (g): Fix return type, avoid -Wall warning.
2011-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/20_util/bind/48698.cc (g): Fix return type, avoid -Wall
	warning.

From-SVN: r179526
2011-10-04 21:42:43 +00:00
Jonathan Wakely 73f0503101 alloc_traits.h (__alloc_traits::max_size): Define.
2011-10-04  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/ext/alloc_traits.h (__alloc_traits::max_size): Define.
	(__alloc_traits::rebind): Define.
	* include/bits/stl_vector.h: Use them.
	* testsuite/util/testsuite_allocator.h (SimpleAllocator): Define.
	* testsuite/23_containers/vector/allocator/minimal.cc: New.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
	Adjust dg-error line numbers.
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_2_neg.cc: Likewise.

From-SVN: r179523
2011-10-04 21:34:54 +01:00
Jonathan Wakely 491258e638 pointer_to.cc: Define equality operator and use.
2011-10-03  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* testsuite/20_util/pointer_traits/pointer_to.cc: Define equality
	operator and use.

From-SVN: r179473
2011-10-03 20:11:53 +01:00
Paolo Carlini 1c29961267 hashtable.h (_Hashtable<>::insert(value_type&&), [...]): Don't define here...
2011-10-03  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>::insert(value_type&&),
	insert(const_iterator, value_type&&)): Don't define here...
	* include/bits/unordered_set.h (__unordered_set<>,
	__unordered_multiset<>): ... define here instead.

From-SVN: r179464
2011-10-03 15:28:47 +00:00
Jason Merrill d602756341 re PR c++/35722 ([C++0x] Variadic templates expansion into non-variadic class template)
PR c++/35722
	Implement N2555 (expanding pack expansion to fixed parm list)
	* pt.c (coerce_template_parms): Allow expanding a pack expansion
	to a fixed-length argument list.
	(unify_pack_expansion): Handle explicit args properly.
	(unify) [TREE_VEC]: Handle pack expansions here.
	[TYPE_ARGUMENT_PACK]: Not here.
	(tsubst_pack_expansion): Don't try to do partial substitution.
	(pack_deducible_p): New.
	(fn_type_unification): Use it.
	(find_parameter_packs_r): Take the TYPE_MAIN_VARIANT
	of a type parameter.
	(check_non_deducible_conversion): Split from type_unification_real.
	(unify_one_argument): Split from type_unification_real...
	(unify_pack_expansion): ...and here.  Drop call_args_p parm.
	(type_unification_real, unify, more_specialized_fn): Adjust.

From-SVN: r179436
2011-10-02 17:45:01 -04:00
François Dumont cdfa3dbb86 vector (vector<>::erase(iterator, iterator): Check iterators equality using normal iterators.
2011-10-01  François Dumont  <fdumont@gcc.gnu.org>

        * include/debug/vector (vector<>::erase(iterator, iterator): Check
        iterators equality using normal iterators.
        * include/debug/deque (deque<>::erase(iterator, iterator): Likewise.

From-SVN: r179414
2011-10-01 19:21:57 +00:00
Paolo Carlini b24a983561 hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)): Remove noexcept from declaration too.
2011-09-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)):
	Remove noexcept from declaration too.

From-SVN: r179360
2011-09-29 17:26:32 +00:00
Benjamin Kosnik 5e3a0ed1a7 *: Regenerate.
2011-09-27  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/html/*: Regenerate.

	* doc/Makefile.am: Un-nest the ext output directory.
	* doc/Makefile.in: Regenerate.
	* spine.xml: Remove authors, add abstract for short
	contents. Rename to index.html for html output.
	* manual/spine.xml: Authors here, manual starts with index.html.
	* api.xml: Update.
	* faq.xml: Same.

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

From-SVN: r179304
2011-09-28 01:37:10 +00:00
Marcus Shawcroft 16fa5e238a tinfo.cc (type_info::operator==): Test __name instead of name().
2011-09-27  Marcus Shawcroft  <marcus.shawcroft@arm.com>

	* libsupc++/tinfo.cc (type_info::operator==): Test __name instead
	of name().

From-SVN: r179236
2011-09-27 06:03:58 +00:00
Paolo Carlini a7cee01d32 re PR libstdc++/50529 ([C++0x] std::vector::erase invokes undefined behavior with empty range)
2011-09-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50529
	* include/bits/vector.tcc (vector<>::erase(iterator, iterator)):
	Fix to do nothing if the range is empty.
	* include/bits/stl_bvector.h: Likewise.
	* include/bits/deque.tcc: Likewise.
	* include/debug/vector: Adjust.
	* include/debug/deque: Likewise.
	* testsuite/23_containers/vector/modifiers/erase/50529.cc: New.
	* testsuite/23_containers/deque/modifiers/erase/50529.cc: Likewise.
	* testsuite/23_containers/deque/modifiers/erase/3.cc: Adjust.

From-SVN: r179234
2011-09-27 02:39:34 +00:00
Benjamin Kosnik 2799d97293 re PR libstdc++/48698 (gnu-versioned-namespace problems)
2011-09-26  Benjamin Kosnik  <bkoz@redhat.com
            Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/48698
	* acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Set libtool_VERSION here.
	* configure.ac: Move AC_SUBST of libtool_VERSION past call to
	GLIBCXX_ENABLE_SYMVERS.
	* configure: Regenerate.
	* include/bits/c++config: Use __7 as versioned namespace name.
	* config/abi/pre/gnu-versioned-namespace.ver: Change mangling as
	per above.
	* include/c_global/cwchar: Adjust nested namespaces.
	* testsuite/20_util/bind/48698.cc: Add test case.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Change line number.

From-SVN: r179221
2011-09-27 00:02:54 +00:00
Paolo Carlini a0ce4616fb revert: testsuite_error.h: Add empty default constructor to __gnu_test::test_category and...
2011-09-25  Paolo Carlini  <paolo.carlini@oracle.com>

	Revert (no longer necessary post r179130):

	2010-04-27  Fabien Chêne  <fabien.chene@gmail.com>

	* testsuite/util/testsuite_error.h: Add empty default constructor
	to __gnu_test::test_category and
	__gnu_test::test_derived_category.
	* src/future.cc: Add empty default constructor to
	future_error_category.
	* src/system_error.cc: Add default ctor to generic_error_category
	and system_error_category.

From-SVN: r179172
2011-09-25 20:58:46 +00:00
John Salmon 82582df651 re PR libstdc++/50510 ([C++0x] transposed variable names in std::seed_seq::generate)
2011-09-24  John Salmon  <john.salmon@deshaw.com>

	PR libstdc++/50510
	* include/bits/random.tcc (seed_seq::generate): Fix computation.

From-SVN: r179149
2011-09-24 22:34:50 +00:00
John Salmon 9d1f3ce6ff re PR libstdc++/50509 ([C++0x] incorrect code in std::seed_seq::generate)
2011-09-24  John Salmon  <john.salmon@deshaw.com>

	PR libstdc++/50509
	* include/bits/random.tcc (seed_seq::generate): Fix computation.

From-SVN: r179144
2011-09-24 18:28:36 +00:00
Benjamin Kosnik 696d4bc16e Makefile.am (stamp-epub-docbook): Fix image directory location.
2011-09-21  Benjamin Kosnik  <bkoz@redhat.com

	* doc/Makefile.am (stamp-epub-docbook): Fix image directory location.
	* doc/Makefile.in: Regenerate.

From-SVN: r179066
2011-09-21 23:46:36 +00:00
Paolo Carlini fd1e62c239 limits.cc: Replace everywhere __int128_t -> __int128, and __uint128_t -> unsigned __int128.
2011-09-21  Paolo Carlini  <paolo.carlini@oracle.com>

	* src/limits.cc: Replace everywhere __int128_t -> __int128, and
	__uint128_t -> unsigned __int128.
	* include/std/type_traits: Likewise.
	* include/std/limits: Likewise.
	* testsuite/18_support/numeric_limits/dr559.cc: Likewise.
	* testsuite/18_support/numeric_limits/lowest.cc: Likewise.
	* testsuite/18_support/numeric_limits/40856.cc: Likewise.
	* testsuite/18_support/numeric_limits/max_digits10.cc: Likewise.
	* testsuite/util/testsuite_common_types.h: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs-1.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise.
	* testsuite/20_util/is_floating_point/value.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Likewise.
	* testsuite/20_util/is_signed/value.cc: Likewise.
	* testsuite/20_util/is_unsigned/value.cc: Likewise.
	* testsuite/20_util/is_integral/value.cc: Likewise.
	* config/abi/pre/gnu.ver: Likewise.
	* acinclude.m4: Likewise.
	* configure: Regenerate.
	* config.h.in: Likewise.

From-SVN: r179044
2011-09-21 11:23:11 +00:00
Paolo Carlini 12bfa8bd29 re PR libstdc++/40856 (numeric_limits not specialized for __int128_t or __uint128_t)
2011-09-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40856
	* include/std/limits (numeric_limits<__int128_t>,
	numeric_limits<__uint128_t>): Add.
	* src/limits.cc:Define.
	* config/abi/pre/gnu.ver: Export.
	* include/ext/typelist.h (_GLIBCXX_TYPELIST_CHAIN16, 20): Add.
	* testsuite/util/testsuite_common_types.h (integral_types_gnu): Add
	(limits_tl): Use it.
	* testsuite/18_support/numeric_limits/requirements/
	constexpr_functions.cc: Likewise.
	* testsuite/18_support/numeric_limits/40856.cc: New.
	* testsuite/18_support/numeric_limits/dr559.cc: Extend.
	* testsuite/18_support/numeric_limits/lowest.cc: Likewise.
	* testsuite/18_support/numeric_limits/max_digits10.cc: Likewise.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error
	line numbers.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
	Likewise.
	* testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
	Likewise.
	* testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
	Likewise.

From-SVN: r178969
2011-09-19 11:52:49 +00:00
Paolo Carlini 6d585f0114 re PR libstdc++/50441 ([C++0x] <type_traits> is missing GNU extension types)
2011-09-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50441
	* acinclude.m4 ([GLIBCXX_ENABLE_INT128_FLOAT128]): Add.
	* configure.ac: Call it.
	* include/std/type_traits (__is_integral_helper<__int128_t>,
	__is_integral_helper<__uint128_t>,
	__is_floating_point_helper<__float128>,
	__make_unsigned<__int128_t>, __make_signed<__uint128_t>): Add.
	* testsuite/20_util/make_signed/requirements/typedefs-1.cc: Extend.
	* testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Likewise.
	* testsuite/20_util/is_signed/value.cc: Likewise.
	* testsuite/20_util/is_unsigned/value.cc: Likewise.
	* testsuite/20_util/is_integral/value.cc: Likewise.
	* testsuite/20_util/is_floating_point/value.cc: New.
	* testsuite/20_util/is_floating_point/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_floating_point/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
	dg-error line numbers.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
	* configure: Regenerate.
	* config.h.in: Likewise.

From-SVN: r178933
2011-09-17 23:53:26 +00:00
François Dumont 1c56f7cb72 hashtable.h (_Hashtable<>::__rehash_policy(const _RehashPolicy&)): Commit the modification of the policy only if no exception occured.
2011-09-17  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/hashtable.h (_Hashtable<>::__rehash_policy(const
	_RehashPolicy&)): Commit the modification of the policy only if no
	exception occured.
	* testsuite/23_containers/unordered_set/max_load_factor/robustness.cc:
	New.

From-SVN: r178927
2011-09-17 09:12:24 +00:00
Paolo Carlini 71743a68ec less_or_equal.cc: New.
2011-09-16  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/array/comparison_operators/
	less_or_equal.cc: New.
	* testsuite/23_containers/array/comparison_operators/
	greater_or_equal.cc: Likewise.
	* testsuite/23_containers/array/comparison_operators/less.cc: Likewise.
	* testsuite/23_containers/array/comparison_operators/equal.cc: Likewise.
	* testsuite/23_containers/array/comparison_operators/not_equal.cc:
	Likewise.
	* testsuite/23_containers/array/comparison_operators/greater.cc:
	Likewise.
	* testsuite/23_containers/array/iterators/end_is_one_past.cc: Likewise.
	* testsuite/23_containers/array/capacity/empty.cc: Likewise.
	* testsuite/23_containers/array/capacity/max_size.cc: Likewise.
	* testsuite/23_containers/array/capacity/size.cc: Likewise.
	* testsuite/23_containers/array/tuple_interface/tuple_element.cc:
	Likewise.
	* testsuite/23_containers/array/tuple_interface/tuple_size.cc:
	Likewise.
	* testsuite/23_containers/array/element_access/at_out_of_range.cc:
	Likewise.
	* testsuite/23_containers/array/element_access/back.cc: Likewise.
	* testsuite/23_containers/array/element_access/front.cc: Likewise.
	* testsuite/23_containers/array/element_access/data.cc: Likewise.
	* testsuite/23_containers/array/cons/aggregate_initialization.cc:
	Likewise.
	* testsuite/23_containers/array/requirements/zero_sized_arrays.cc:
	Likewise.
	* testsuite/23_containers/array/requirements/contiguous.cc: Likewise.
	* testsuite/23_containers/array/requirements/member_swap.cc: Likewise.
	* testsuite/23_containers/array/specialized_algorithms/swap.cc:
	Likewise.
	* testsuite/23_containers/array/constexpr_get.cc: Move...
	* testsuite/23_containers/array/tuple_interface/constexpr_get.cc:
	... here.
	* testsuite/23_containers/array/requirements/get.cc: Move...
	* testsuite/23_containers/array/tuple_interface/get: ... here.
	* testsuite/23_containers/array/at_neg.cc: Move...
	* testsuite/23_containers/array/element_access: ... here.
	* testsuite/23_containers/array/requirements/constexpr_functions.cc:
	Move...
	* testsuite/23_containers/array/capacity: ... here.
	* testsuite/23_containers/array/requirements/
	constexpr_element_access.cc: Move...
	* testsuite/23_containers/array/element_access: ... here.

	* testsuite/20_util/duration/cons/1_neg.cc: Avoid -Wall warnings.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Likewise.
	* testsuite/20_util/pair/make_pair/constexpr.cc: Likewise.
	* testsuite/20_util/time_point/nonmember/constexpr.cc: Likewise.
	* testsuite/23_containers/bitset/operations/constexpr.cc: Likewise.

	* testsuite/20_util/duration/cons/1_neg.cc: Discard bogus warning.
	* testsuite/20_util/forward/1_neg.cc: Likewise.

From-SVN: r178911
2011-09-16 16:28:31 +00:00
Paolo Carlini fae3f4598a tuple (make_tuple, [...]): Declare constexpr.
2011-09-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/tuple (make_tuple, forward_as_tuple): Declare constexpr.
	(_Tuple_impl<>::_Tuple_impl(_Tuple_impl<>&&)): Likewise.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Enable
	make_tuple test.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-warning
	line number.

From-SVN: r178904
2011-09-16 00:41:33 +00:00
François Dumont 7e5ac0a4f5 hashtable.h (_Hashtable<>::_M_rehash): Take and restore hash policy _M_prev_resize on exception.
2011-09-14  François Dumont  <fdumont@gcc.gnu.org>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>::_M_rehash): Take and restore
	hash policy _M_prev_resize on exception.
	(_Hashtable<>::_M_insert_bucket): Capture hash policy next resize
	before using it and use latter method to have it restored on exception.
	(_Hashtable<>::_M_insert(_Arg&& __v, std::false_type): Likewise.
	(_Hashtable<>::insert(_InputIterator, _InputIterator): Likewise.
	(_Hashtable<>::rehash): Likewise.
	* testsuite/23_containers/unordered_set/insert/hash_policy.cc: New.
	* testsuite/23_containers/unordered_multiset/insert/hash_policy.cc:
	Likewise.


Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r178861
2011-09-14 19:50:20 +00:00
Paul Brook 1e874273f8 arm.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
2011-09-13  Paul Brook  <paul@codesourcery.com>
 
	gcc/
	* config/arm/arm.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
	(ARM_TARGET2_DWARF_FORMAT): Provide default definition.
	* config/arm/linux-eabi.h (ARM_TARGET2_DWARF_FORMAT): Define.
	* config/arm/symbian.h (ARM_TARGET2_DWARF_FORMAT): Define.
	* config/arm/uclinux-eabi.h(ARM_TARGET2_DWARF_FORMAT): Define.
	* config/arm/t-bpabi (EXTRA_HEADERS): Add unwind-arm-common.h.
	* config/arm/t-symbian (EXTRA_HEADERS): Add unwind-arm-common.h.
	* config/c6x/c6x.c (c6x_output_file_unwind): Don't rely on dwarf2 code
	enabling unwind tables.
	(c6x_debug_unwind_info): New function.
	(TARGET_ARM_EABI_UNWINDER): Define.
	(TARGET_DEBUG_UNWIND_INFO): Define.
	* config/c6x/c6x.h (DWARF_FRAME_RETURN_COLUMN): Define.
	(TARGET_EXTRA_CFI_SECTION): Remove.
	* config/c6x/t-c6x-elf (EXTRA_HEADERS): Set.
	* ginclude/unwind-arm-common.h: New file.

	libgcc/
	* config.host (tic6x-*-*): Add c6x/t-c6x-elf.  Set unwind_header.
	* unwind-c.c (PERSONALITY_FUNCTION): Use UNWIND_POINTER_REG.
	* unwind-arm-common.inc: New file.
	* config/arm/unwind-arm.c: Use unwind-arm-common.inc.
	* config/arm/unwind-arm.h: Use unwind-arm-common.h.
	(_GLIBCXX_OVERRIDE_TTYPE_ENCODING): Define.
	* config/c6x/libunwind.S: New file.
	* config/c6x/pr-support.c: New file.
	* config/c6x/unwind-c6x.c: New file.
	* config/c6x/unwind-c6x.h: New file.
	* config/c6x/t-c6x-elf: New file.


	libstdc++-v3/
	* libsupc++/eh_arm.cc (__cxa_end_cleanup): Add C6X implementation.
	* libsupc++/eh_call.cc (__cxa_call_unexpected): Set rtti_base.
	* libsupc++/eh_personality.cc (NO_SIZE_OF_ENCODED_VALUE): Remove
	__ARM_EABI_UNWINDER__ check.
	(parse_lsda_header): Check _GLIBCXX_OVERRIDE_TTYPE_ENCODING.
	(get_ttype_entry): Use generic implementation on ARM EABI.
	(check_exception_spec): Use _Unwind_decode_typeinfo_ptr and
	UNWIND_STACK_REG.
	(PERSONALITY_FUNCTION): Set ttype_base.

From-SVN: r178808
2011-09-13 12:48:33 +00:00
Daniel Krugler 9480716c80 tuple (_Head_base<>::_M_head, [...]): Change to static constexpr functions; adjust everywhere.
2011-09-12  Daniel Krugler  <daniel.kruegler@googlemail.com>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/tuple (_Head_base<>::_M_head, _Head_base<>::_M_tail,
	_Tuple_impl<>::_M_head, _Tuple_impl<>::_M_tail): Change to static
	constexpr functions; adjust everywhere.
	(__get_helper, get): Declare constexpr all three overloads.
	(tuple_cat): Declare constexpr; use late return type to improve
	error messages.
	* include/std/utility (__pair_get<>::__get, __pair_get<>::__move_get,
	__pair_get<>::__const_get, get): Declare all constexpr.
	* include/std/array (get): Likewise.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Re-enable
	tuple_cat test.
	* testsuite/23_containers/array/constexpr_get.cc: New.
	* testsuite/20_util/tuple/element_access/constexpr_get.cc: Likewise.
	* testsuite/20_util/pair/constexpr_get.cc: Likewise.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
	line number.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r178799
2011-09-13 00:06:25 +00:00
Jason Merrill 62a405ddf3 * call.c (convert_class_to_reference)
(convert_class_to_reference_1): Remove.
	(reference_binding): Use build_user_type_conversion_1 instead.

From-SVN: r178789
2011-09-12 14:04:46 -04:00
Daniel Krugler ac65b7d221 re PR libstdc++/50159 ([C++0x] tuple_cat only accepts two arguments)
2011-09-11  Daniel Krugler  <daniel.kruegler@googlemail.com>

	PR libstdc++/50159
	* include/std/tuple (tuple_cat): Reimplement according to the
	resolution of LWG 1385.
	* include/std/type_traits: Define __and_ and __or_ for zero
	arguments too; minor tweaks.
	* testsuite/20_util/tuple/creation_functions/tuple_cat.cc: New.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Disable
	for now tuple_cat test.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
	line numbers.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* doc/xml/manual/status_cxx200x.xml: Update.

From-SVN: r178770
2011-09-11 22:10:21 +00:00
Paolo Carlini 049d289351 tuple: Use everywhere std::size_t...
2011-09-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/tuple: Use everywhere std::size_t... instead of int...
	* include/std/functional: Likewise.
	* include/std/scoped_allocator: Likewise.
	* include/bits/stl_pair.h: Likewise.

From-SVN: r178746
2011-09-10 00:47:02 +00:00
Paolo Carlini ebb6e4af61 re PR libstdc++/50336 (LWG issue 445)
2011-09-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50336
	* include/bits/streambuf_iterator.h (class istreambuf_iterator):
	Implement LWG 445 in C++0x mode.
	* testsuite/24_iterators/istreambuf_iterator/requirements/dr445.cc:
	New.

From-SVN: r178713
2011-09-08 22:42:21 +00:00
Dodji Seketeli 3797cb21ff PR c++/33255 - Support -Wunused-local-typedefs warning
gcc/

	* c-decl.c (lookup_name): Use the new
	maybe_record_typedef_use.
	(pushdecl): Use the new
	record_locally_defined_typedef.
	(store_parm_decls): Allocate cfun->language.
	(finish_function): Use the new maybe_warn_unused_local_typedefs,
	and free cfun->language.
	(c_push_function_context): Allocate cfun->language here only if
	needed.
	(c_pop_function_context): Likewise, mark cfun->language
	for collection only when it should be done.
	* c-common.c (handle_used_attribute): Don't ignore TYPE_DECL
	nodes.
	* c-typeck.c (c_expr_sizeof_type, c_cast_expr): Use the new
	maybe_record_local_typedef_use.

gcc/c-family

	* c-common.h (struct c_language_function::local_typedefs): New
	field.
	(record_locally_defined_typedef, maybe_record_typedef_use)
	(maybe_warn_unused_local_typedefs): Declare new functions.
	* c-common.c (record_locally_defined_typedef)
	(maybe_record_typedef_use)
	(maybe_warn_unused_local_typedefs): Define new functions.
	* c.opt: Declare new -Wunused-local-typedefs flag.

gcc/cp

	* name-lookup.c (pushdecl_maybe_friend_1): Use the new
	record_locally_defined_typedef.
	* decl.c (finish_function): Use the new
	maybe_warn_unused_local_typedefs.
	(grokfield): Use the new record_locally_defined_typedef.
	* parser.c (lookup_name): Use the new maybe_record_typedef_use.

gcc/doc/

	* invoke.texi: Update documentation for -Wunused-local-typedefs.

gcc/testsuite/

	* g++.dg/warn/Wunused-local-typedefs.C: New test file.
	* c-c++-common/Wunused-local-typedefs.c: Likewise.

libstdc++-v3/

	* include/ext/bitmap_allocator.h
	(__detail::__mini_vector::__lower_bound): Remove unused typedef.
	* src/istream.cc (std::operator>>(basic_istream<char>& __in,
	basic_string<char>& __str)): Likewise.
	(std::getline): Likewise.
	* src/valarray.cc (__valarray_product): Likewise.

From-SVN: r178692
2011-09-08 15:54:24 +02:00
François Dumont 02dce1e99c at.cc: Revert to...
2011-09-07  François Dumont  <francois.cppdevs@free.fr>

	* testsuite/23_containers/array/at.cc: Revert to...
	* testsuite/23_containers/array/at_neg.cc: ...this.

From-SVN: r178670
2011-09-08 01:24:11 +00:00
Jason Merrill 30288f9aa2 pt.c (type_unification_real): Correct complain arg for tsubsting default template args.
* pt.c (type_unification_real): Correct complain arg for tsubsting
	default template args.

From-SVN: r178651
2011-09-07 13:11:37 -04:00
Benjamin Kosnik a7d0c94ef1 tuple (_Tuple_impl::_M_head, _M_tail): Mark constexpr.
2011-09-06  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/tuple (_Tuple_impl::_M_head, _M_tail): Mark constexpr.
	(tuple(tuple&&)): Same.
	(tuple(const tuple<_UElements...>& __in)): Same.
	(tuple(tuple<_UElements...>&& __in)): Same.
	(tuple_cat(const tuple<_TElements...>&, const tuple<_UElements...>&)):
	Same.
	(get): Same.
	* include/std/array: Consolidate array::data usage.
	* testsuite/23_containers/array/requirements/constexpr_functions.cc:
	Remove extra include.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: New.
	* testsuite/20_util/tuple/cons/constexpr-2.cc: Add tests.
	* testsuite/20_util/tuple/cons/constexpr-3.cc: Same.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust line numbers.

From-SVN: r178620
2011-09-07 00:17:09 +00:00
François Dumont e25fc78ff5 hashtable_policy.h (_Prime_rehash_policy:: _M_next_bkt): Cast _M_max_load_factor to long double.
2011-09-06  François Dumont  <fdumont@gcc.gnu.org>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable_policy.h (_Prime_rehash_policy::
	_M_next_bkt): Cast _M_max_load_factor to long double.
	(_Prime_rehash_policy::_M_bkt_for_elements): Use _M_next_bkt.
	(_Prime_rehash_policy::_M_need_rehash): Likewise; cast all
	float quantities to long double.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r178615
2011-09-06 22:13:46 +00:00