Commit Graph

4230 Commits

Author SHA1 Message Date
Paolo Carlini 116a365bd4 re PR libstdc++/37547 ([c++0x] minmax with initializer_list gives incorrect results)
2008-09-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/37547
	* include/bits/stl_algo.h (min(initializer_list<>),
	min(initializer_list<>, Compare), max(initializer_list<>),
	max(initializer_list<>, Compare), minmax(initializer_list<>),
	minmax(initializer_list<>, Compare)): Fix return type.
	* include/bits/algorithmfwd.h: Adjust.
	* testsuite/25_algorithms/headers/algorithm/synopsis.cc: Likewise.
	* testsuite/25_algorithms/max/requirements/explicit_instantiation/3.cc:
        Likewise.
        * testsuite/25_algorithms/max/requirements/explicit_instantiation/
        pod2.cc: Likewise.
	* testsuite/25_algorithms/min/requirements/explicit_instantiation/3.cc:
        Likewise.
        * testsuite/25_algorithms/min/requirements/explicit_instantiation/
        pod2.cc: Likewise.
	* testsuite/25_algorithms/minmax/requirements/explicit_instantiation/
	3.cc: Likewise.
        * testsuite/25_algorithms/minmax/requirements/explicit_instantiation/
        pod2.cc: Likewise.
	* testsuite/25_algorithms/max/37547.cc: New.
	* testsuite/25_algorithms/min/37547.cc: Likewise.
	* testsuite/25_algorithms/minmax/37547.cc: Likewise.

From-SVN: r140435
2008-09-17 22:58:38 +00:00
Paolo Carlini 1edd1a8317 [multiple changes]
2008-09-16  Chris Fairles  <chris.fairles@gmail.com>

        * testsuite/25_algorithms/min/requirements/explicit_instantiation/3.cc:
        New.
        * testsuite/25_algorithms/min/requirements/explicit_instantiation/
        pod2.cc: Likewise.
        * testsuite/25_algorithms/min/3.cc: Likewise.
        * testsuite/25_algorithms/min/4.cc: Likewise.
        * testsuite/25_algorithms/max/requirements/explicit_instantiation/3.cc:
        Likewise.
        * testsuite/25_algorithms/max/requirements/explicit_instantiation/
        pod2.cc: Likewise.
        * testsuite/25_algorithms/max/3.cc: Likewise.
        * testsuite/25_algorithms/max/4.cc: Likewise.
        * testsuite/25_algorithms/minmax/requirements/explicit_instantiation/
        3.cc: Likewise.
        * testsuite/25_algorithms/minmax/requirements/explicit_instantiation/
        pod2.cc: Likewise.
        * testsuite/25_algorithms/minmax/2.cc: Likewise.
        * testsuite/25_algorithms/minmax/3.cc: Likewise.

2008-09-16  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/stl_algo.h (min(initializer_list<>),
	min(initializer_list<>, Compare), max(initializer_list<>),
	max(initializer_list<>, Compare), minmax(initializer_list<>),
	minmax(initializer_list<>, Compare)): Add in C++0x mode.
	* include/bits/algorithmfwd.h: Add.
	* testsuite/25_algorithms/headers/algorithm/synopsis.cc: Likewise.

From-SVN: r140404
2008-09-16 23:17:09 +00:00
Chris Fairles 38b5077013 1.cc: Join thread before program exits.
2008-09-13  Chris Fairles  <chris.fairles@gmail.com>

        * testsuite/30_threads/thread/algorithm/1.cc: Join thread before
        program exits.
        * testsuite/30_threads/thread/algorithm/2.cc: Likewise.
        * testsuite/30_threads/thread/this_thread/3.cc: Define test variable.
        * testsuite/30_threads/thread/this_thread/4.cc: Likewise.
        

Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>

From-SVN: r140338
2008-09-13 09:38:05 +00:00
Chris Fairles 46e113bf2b thread: New.
2008-09-12  Chris Fairles <chris.fairles@gmail.com>
	    Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/thread: New.
	* include/Makefile.am: Update.
	* include/Makefile.in: Regenerate.
	* src/thread.cc: New.
	* src/Makefile.am: Update.
	* src/Makefile.in: Regenerate.
	* acinclude.m4: Add check for nanosleep.
	* configure.ac: Call it.
	* configure: Regenerate.
	* config.h.in: Likewise.
	* config/abi/pre/gnu.ver: Add exports.
	* doc/doxygen/user.cfg.in: Add thread header.
	* testsuite/lib/libstdc++.exp (check_v3_target_nanosleep): Add.
	* testsuite/lib/dg-options.exp (dg-require-nanosleep): Add.
	* testsuite/30_threads/thread/cons/1.cc: New.
	* testsuite/30_threads/thread/cons/2.cc: Likewise.
	* testsuite/30_threads/thread/cons/3.cc: Likewise.
	* testsuite/30_threads/thread/cons/4.cc: Likewise.
	* testsuite/30_threads/thread/algorithm/1.cc: Likewise.
	* testsuite/30_threads/thread/algorithm/2.cc: Likewise.
	* testsuite/30_threads/thread/member/1.cc: Likewise.
	* testsuite/30_threads/thread/member/2.cc: Likewise.
	* testsuite/30_threads/thread/member/3.cc: Likewise.
	* testsuite/30_threads/thread/this_thread/1.cc: Likewise.
	* testsuite/30_threads/thread/this_thread/2.cc: Likewise.
	* testsuite/30_threads/thread/this_thread/3.cc: Likewise.
	* testsuite/30_threads/thread/this_thread/4.cc: Likewise.
	* testsuite/30_threads/headers/thread/types_std_c++0x.cc: Likewise.
	* testsuite/30_threads/headers/thread/std_c++0x_neg.cc: Likewise.
	* testsuite/17_intro/headers/c++200x/all.cc: Add thread.
	* testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc: 
	Add thread, condition_variable and mutex.

Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>

From-SVN: r140332
2008-09-13 00:32:37 +00:00
Paolo Carlini 08376e28d4 ctype.cc (use_facet<ctype<char> >, [...]): Remove specializations.
2008-09-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* src/ctype.cc (use_facet<ctype<char> >, use_facet<ctype<wchar_t>):
	Remove specializations.
	* src/locale-inst.cc (use_facet<ctype<C> >): Instantiate.
	* include/bits/locale_facets.tcc (use_facet<ctype<char> >,
	use_facet<ctype<wchar_t>): Declare as extern template.
	* include/bits/locale_facets.h (use_facet<ctype<char> >,
	use_facet<ctype<wchar_t>): Do not declare as specializations.

From-SVN: r140251
2008-09-10 21:34:38 +00:00
Paolo Carlini 1834f167ee ctype_members.cc (ctype<char>::_M_narrow_init, [...]): Don't define here.
2008-09-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* config/locale/darwin/ctype_members.cc (ctype<char>::_M_narrow_init,
	ctype<char>::_M_widen_init): Don't define here.
	* config/locale/gnu/ctype_members.cc: Likewise.
	* config/locale/generic/ctype_members.cc: Likewise.
	* src/ctype.cc: Define here.

From-SVN: r140240
2008-09-10 17:37:30 +00:00
Paolo Carlini 6c43852a18 re PR libstdc++/37455 (Code bloat for ostream.widen('\n'))
2008-09-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/37455
	* include/bits/locale_facets.h (ctype<char>::_M_narrow_init,
	ctype<char>::_M_widen_init): Don't define inline.
	* config/locale/darwin/ctype_members.cc: ... define here.
	* config/locale/gnu/ctype_members.cc: ... likewise.
	* config/locale/generic/ctype_members.cc: ... likewise.
	* config/abi/pre/gnu.ver: Export.

From-SVN: r140238
2008-09-10 16:48:47 +00:00
Benjamin Kosnik 05665c0620 abi.xml: Update for new releases.
2008-09-09  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/xml/manual/abi.xml: Update for new releases.
	* doc/doxygen/user.cfg.in: Include C compatibility headers.
	* doc/html/*: Regenerate.

From-SVN: r140180
2008-09-09 22:42:23 +00:00
Paolo Carlini 07ebe945c7 2008-09-09 Paolo Carlini <paolo.carlini@oracle.com>
* Fix typo in ChangeLog.

From-SVN: r140175
2008-09-09 21:36:42 +00:00
Paolo Carlini 802841eb8c cinttypes: Restore __STDC_FORMAT_MACRO after inclusion of <inttypes.h>.
2008-09-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/tr1_impl/cinttypes: Restore __STDC_FORMAT_MACRO after
	inclusion of <inttypes.h>.
	* include/tr1_impl/cstdint: Likewise for __STDC_LIMIT_MACROS and
	__STDC_CONSTANT_MACROS after <stdint.h>.
	* include/bits/postypes.h: Likewise.

From-SVN: r140174
2008-09-09 21:33:46 +00:00
Andreas Schwab d4abedf105 (GLIBCXX_CHECK_STANDARD_LAYOUT): Fix compile check
not to redefine main.

From-SVN: r140148
2008-09-09 13:37:14 +00:00
Paolo Carlini a834e097ea acinclude.m4 ([GLIBCXX_CHECK_C99_TR1]): Check wcstoimax and wcstoumax, define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1.
2008-09-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* acinclude.m4 ([GLIBCXX_CHECK_C99_TR1]): Check wcstoimax and
	wcstoumax, define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1.
	* include/tr1_impl/cinttypes: Use the latter.
	* testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Likewise.
	* configure: Regenerate.
	* config.h.in: Likewise.

From-SVN: r140089
2008-09-07 16:41:06 +00:00
Paolo Carlini 57f59a4580 [multiple changes]
2008-09-05  Peter Dimov  <pdimov@mmltd.net>

	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc: New.

2008-09-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref.cc: Rename
	to...
	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_1.cc: ...
	this.

From-SVN: r140039
2008-09-05 17:12:02 +00:00
Jonathan Wakely 640cbe76c7 re PR libstdc++/36962 ([C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr)
PR libstdc++/36962
	* include/Makefile.am: Update headers.
	* include/Makefile.in: Regenerate.
	* include/std/memory: Update headers.
	* include/tr1/memory: Likewise.
	* include/tr1_impl/boost_shared_ptr.h: Remove, splitting into
	separate implementations for std and tr1.
	* include/bits/boost_sp_shared_count.h: Remove.
	* include/tr1/boost_sp_shared_count.h: Remove.
	* include/bits/shared_ptr.h: New. Combines boost_sp_shared_count.h
	and boost_shared_ptr.h into one file.
	(__shared_count,__shared_ptr,shared_ptr,swap): Add unique_ptr
	and rvalue-reference support as per current WP.
	* include/tr1/shared_ptr.h: New. Combines boost_sp_shared_count.h
	and boost_shared_ptr.h into one file.
	* testsuite/20_util/shared_ptr/cons/unique_ptr.cc: New.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc: New.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref.cc: New.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_neg.cc: New.
	* testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc: New.
	* testsuite/20_util/shared_ptr/assign/unique_ptr_lvalue_neg.cc: New.
	* testsuite/20_util/shared_ptr/assign/unique_ptr_rvalue.cc: New.
	* testsuite/20_util/shared_ptr/modifiers/swap_rvalue.cc: New.
	* testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue_neg.cc: Remove.

From-SVN: r140012
2008-09-04 23:33:10 +01:00
Jonathan Wakely 2442947e97 * doc/xml/manual/locale.xml: Fix typo.
From-SVN: r140003
2008-09-04 21:10:14 +01:00
Paolo Carlini a1c5742d23 acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Tidy checks in case of POSIX threads.
2008-09-04  Paolo Carlini  <paolo.carlini@oracle.com>

 	* acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Tidy checks in case of
	POSIX threads.
	* configure: Regenerate.

From-SVN: r139994
2008-09-04 18:57:42 +00:00
Chris Fairles d74eef3beb mutex (once_flag): Construct __gthread_once_t in a temporary variable before assigning to _M_once...
2008-09-04  Chris Fairles  <chris.fairles@gmail.com>

        * include/std/mutex (once_flag): Construct __gthread_once_t in a
	temporary variable before assigning to _M_once to avoid initialization
	errors.

From-SVN: r139986
2008-09-04 14:35:54 +00:00
Paolo Carlini 37383ef55e gnu.ver: Also export __once_functor_lock...
2008-09-03  Paolo Carlini  <paolo.carlini@oracle.com>

	* config/abi/pre/gnu.ver: Also export __once_functor_lock; tighten
	GLIBCXX_3.4 exports (necessary in case of undef _GLIBCXX_HAVE_TLS).

	* Makefile.in: Regenerate.
	* src/Makefile.in: Likewise.
	* doc/Makefile.in: Likewise.
	* po/Makefile.in: Likewise.
	* libmath/Makefile.in: Likewise.
	* include/Makefile.in: Likewise.
	* libsupc++/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.

From-SVN: r139968
2008-09-04 00:57:57 +00:00
Paolo Carlini 83b55915e7 acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Fix typo in last commit, check _POSIX_TIMEOUTS, not _POSIX_TIMERS.
2008-09-03  Paolo Carlini  <paolo.carlini@oracle.com>

	* acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Fix typo in last commit,
	check _POSIX_TIMEOUTS, not _POSIX_TIMERS.
	* configure: Regenerate.

From-SVN: r139963
2008-09-03 22:50:59 +00:00
Paolo Carlini 1ced197082 acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Check _POSIX_TIMERS too.
2008-09-03  Paolo Carlini  <paolo.carlini@oracle.com>

	* acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Check _POSIX_TIMERS too.
	* configure: Regenerate.

From-SVN: r139961
2008-09-03 22:31:29 +00:00
Chris Fairles 7b800287b7 condition_variable: Use new deleted ctors.
2008-09-03  Chris Fairles  <chris.fairles@gmail.com>

        * include/std/condition_variable: Use new deleted ctors.
        * include/std/mutex: Likewise plus implement timed_mutex, 
	recursive_timed_mutex and call_once.
	* src/condition_variable.cc: Implement wait(). Use gthread types.
	Remove _GTHREADS_HAS_COND checks in favor of global
	_GLIBCXX_HAS_GTHREADS.
	* src/mutex.cc (call_once): Implementation using TLS with mutex
	fallback.
	* config/abi/pre/gnu.ver: Add exported symbols.
	* testsuite/lib/libstdc++.exp (check_v3_target_gthreads): New.
	* testsuite/lib/dg-options.exp (dg-require-gthreads): Likewise.
	* testsuite/30_threads/lock_guard/requirements/typedefs.cc: Use
	dg-require-gthreads and dg-require-cstdint.
	* testsuite/30_threads/lock_guard/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
	* testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
	* testsuite/30_threads/mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise.
	* testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
	Likewise.
        * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
        * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc:
	Likewise.
        * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
        * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
        * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
        * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/unique_lock/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise.
        * testsuite/30_threads/mutex/cons/assign_neg.cc: Also adjust dg-error
	lines for deleted members.
        * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise.
        * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise.
        * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise.
	* testsuite/30_threads/call_once/once_flag.cc: New.
	* testsuite/30_threads/call_once/call_once1.cc: Likewise.
	* testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
	* testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise
	* testsuite/30_threads/condition_variable/cons/assign_neg.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/cons/copy_neg.cc:
	Likewise.
	* testsuite/30_threads/condition_variable_any/cons/assign_neg.cc:
	Likewise.
	* testsuite/30_threads/timed_mutex/dest/destructor_locked.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/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/recursive_timed_mutex/dest/destructor_locked.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/native_handle/1.cc: 
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/cons: 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/unique_lock/modifiers/1.cc: Likewise.
	* testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/4.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/1.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/4.cc: Likewise.

From-SVN: r139943
2008-09-03 17:46:09 +00:00
Mark Mitchell a023046841 type_traits (__make_unsigned_selector<>): Consider enums of size smaller than short.
* include/std/type_traits (__make_unsigned_selector<>): Consider
	enums of size smaller than short.
	(__make_signed_selector<>): Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
	Adjust line numbers.
	* testsuite/20_util/make_usigned/requirements/typedefs_neg.cc:
	Adjust line numbers.
	* testsuite/20_util/make_signed/requirements/typedefs-2.cc:
	Ensure test_enum is the same size as short.
	* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
	Ensure test_enum is the same size as short.

From-SVN: r139875
2008-09-01 23:24:09 +00:00
Aaron W. LaFramboise d89f0ad622 configure.ac (RPATH_ENVVAR): Use PATH on Windows.
2008-08-31  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>

	<toplevel>
	* configure.ac (RPATH_ENVVAR): Use PATH on Windows.
	(GCC_SHLIB_SUBDIR): New.
	* Makefile.tpl (HOST_LIB_PATH_gcc): Use GCC_SHLIB_SUBDIR.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

	<gcc>
	* mkmap-flat.awk: Add option pe_dll.
	* config/i386/t-cygming (SHLIB_LINK): Support building libgcc_s.
	* gcc/config/i386/t-cygwin (SHLIB_LC): Add.
	* gcc/config/i386/t-mingw32 (SHLIB_LC): Add.
	* config/i386/mingw32.h (SHARED_LIBGCC_UNDEFS_SPEC): New.
	(SUBTARGET_EXTRA_SPECS): Use SHARED_LIBGCC_UNDEFS_SPEC.
	(LINK_SPEC): Support libgcc_s.
	(LIBGCC_SPEC): Support libgcc_s.
	(LIBGCC_SONAME): New.

	<libstdc++-v3>
	* acinclude.m4 <enable_symvers>: Don't use symvers on Windows.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* src/Makefile.in: Regenerated.
	* doc/makefile.in: Regenerated.
	* po/Makefile.in: Regenerated.
	* libmath/Makefile.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* libsupc++/Makefile.in: Regenerated.
	* testsuite/makefile.in: Regenerated.

From-SVN: r139837
2008-08-31 12:14:25 -06:00
Mark Mitchell 62ec9ed657 2.cc: Constrain iterations when testing on a simultor.
* testsuite/25_algorithms/nth_element/2.cc: Constrain iterations
	when testing on a simultor.

From-SVN: r139805
2008-08-30 17:31:22 +00:00
Paolo Carlini 5a2f8dcf25 typedef.cc: Rename to .../typedefs.cc.
2008-08-28  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/tr1/6_containers/unordered_set/requirements/typedef.cc:
	Rename to .../typedefs.cc.
	* testsuite/tr1/6_containers/unordered_map/requirements/typedef.cc:
	Likewise.
	* testsuite/tr1/6_containers/unordered_multiset/requirements/
	typedef.cc: Likewise.
	* testsuite/tr1/6_containers/unordered_multimap/requirements/
	typedef.cc: Likewise.
	* testsuite/23_containers/unordered_set/requirements/typedef.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/requirements/typedef.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/requirements/typedef.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/requirements/typedef.cc:
	Likewise.

From-SVN: r139741
2008-08-28 23:58:05 +00:00
Chris Fairles b8c41c8ed2 acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): New.
2008-08-28  Chris Fairles  <chris.fairles@gmail.com>

        * acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): New. Checks for gthread
	support used by c++0x thread library.
	* configure.ac: Test unconditionally.
	* configure: Regenerate.
	* config.h.in: Regenerate.

From-SVN: r139705
2008-08-28 10:22:19 +00:00
Benjamin Kosnik 41061822aa Makefile.am: Edit xml file list.
2008-08-27  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/Makefile.am: Edit xml file list.
	* doc/Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/xml/manual/intro.xml: Edit, correct links, structure.
	* doc/xml/manual/configure.xml: Same.
	* doc/xml/manual/debug.xml: Same.
	* doc/xml/manual/test.xml: Same.
	* doc/xml/manual/build.xml: Remove.
	* doc/xml/manual/prerequisites.xml: Add.
	* doc/html/*: Regenerate.

From-SVN: r139690
2008-08-28 00:44:45 +00:00
Paolo Carlini eafb2f2d27 hashtable (_Hashtable<>): Add missing pointer and const_pointer typedefs.
2008-08-27  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/tr1_impl/hashtable (_Hashtable<>): Add missing pointer and
	const_pointer typedefs.
	* testsuite/tr1/6_containers/unordered_set/requirements/typedef.cc:
	Add.
	* testsuite/tr1/6_containers/unordered_map/requirements/typedef.cc:
	Likewise.
	* testsuite/tr1/6_containers/unordered_multiset/requirements/
	typedef.cc: Likewise.
	* testsuite/tr1/6_containers/unordered_multimap/requirements/
	typedef.cc: Likewise.
	* testsuite/23_containers/unordered_set/requirements/typedef.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/requirements/typedef.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/requirements/typedef.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/requirements/typedef.cc:
	Likewise.

From-SVN: r139674
2008-08-27 19:27:11 +00:00
Paul Brook c5e46192bf eh_call.cc (__cxa_call_unexpected): Fix name of __get_object_from_ambiguous_exception.
2008-08-27  Paul Brook  <paul@codesourcery.com>

	* libsupc++/eh_call.cc (__cxa_call_unexpected): Fix name of
	__get_object_from_ambiguous_exception.

From-SVN: r139626
2008-08-27 16:10:19 +00:00
Ben Elliston 41e404e6a5 * src/mt_allocator.cc (__pool): Fix error in comment.
From-SVN: r139617
2008-08-27 10:42:39 +10:00
Paolo Carlini 1894e4c583 acinclude.m4 ([GLIBCXX_CHECK_GETTIMEOFDAY]): Change to use GCC_TRY_COMPILE_OR_LINK.
2008-08-23  Paolo Carlini  <paolo.carlini@oracle.com>

	* acinclude.m4 ([GLIBCXX_CHECK_GETTIMEOFDAY]): Change to use
	GCC_TRY_COMPILE_OR_LINK.
	([GLIBCXX_CHECK_CLOCK_GETTIME]): Rename to
	[GLIBCXX_ENABLE_CLOCK_GETTIME], a versatile configure-time option,
	[no] by default, since it includes TRY_LINK checks.  librt is also
	searched, if requested.
	* doc/xml/manual/configure.xml: Document the latter.
	* configure.ac: Move the above checks outside native-only.
	* configure: Regenerate.

From-SVN: r139576
2008-08-25 22:52:47 +00:00
Paolo Carlini 9ce0a22eb1 acinclude.m4 ([GLIBCXX_CHECK_RANDOM_TR1]): Simplify, just use two test -r instead of an AC_TRY_RUN.
2008-08-24  Paolo Carlini  <paolo.carlini@oracle.com>

	* acinclude.m4 ([GLIBCXX_CHECK_RANDOM_TR1]): Simplify, just use
	two test -r instead of an AC_TRY_RUN.
	* configure: Regenerate.
	* config.h.in: Likewise.

From-SVN: r139549
2008-08-24 23:47:35 +00:00
Paolo Carlini 6c3385c1dd acinclude.m4 ([GLIBCXX_ENABLE_CLOCK_GETTIME]): Improve documentation.
2008-08-24  Paolo Carlini  <paolo.carlini@oracle.com>

	* acinclude.m4 ([GLIBCXX_ENABLE_CLOCK_GETTIME]): Improve documentation.
	* doc/xml/manual/configure.xml: Likewise.

From-SVN: r139533
2008-08-24 09:37:07 +00:00
Paolo Carlini 727cd0bc50 acinclude.m4 ([GLIBCXX_ENABLE_CLOCK_GETTIME]): Use [=KIND] in GLIBCXX_ENABLE.
2008-08-23  Paolo Carlini  <paolo.carlini@oracle.com>

	* acinclude.m4 ([GLIBCXX_ENABLE_CLOCK_GETTIME]): Use [=KIND] in
	GLIBCXX_ENABLE.
	* configure: Regenerate.

From-SVN: r139531
2008-08-24 01:20:13 +00:00
Paolo Carlini 610870b25a acinclude.m4 ([GLIBCXX_CHECK_GETTIMEOFDAY]): Change to use GCC_TRY_COMPILE_OR_LINK.
2008-08-23  Paolo Carlini  <paolo.carlini@oracle.com>

	* acinclude.m4 ([GLIBCXX_CHECK_GETTIMEOFDAY]): Change to use
	GCC_TRY_COMPILE_OR_LINK.
	([GLIBCXX_CHECK_CLOCK_GETTIME]): Rename to
	[GLIBCXX_ENABLE_CLOCK_GETTIME], a versatile configure-time option,
	[no] by default, since it includes TRY_LINK checks.  librt is also
	searched, if requested.
	* doc/xml/manual/configure.xml: Document the latter.
	* configure.ac: Move the above checks outside native-only.
	* configure: Regenerate.

From-SVN: r139530
2008-08-24 00:25:22 +00:00
Paolo Carlini 30a333ceeb [multiple changes]
2008-08-23  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/lib/libstdc++.exp (check_v3_target_atomic_builtins): Add.
	* testsuite/lib/dg-options.exp (dg-require-atomic-builtins): Likewise.
	* testsuite/18_support/exception_ptr/current_exception.cc: Use it.
        * testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
        * testsuite/18_support/exception_ptr/lifespan.cc: Likewise.

2008-08-23  Sebastian Redl <sebastian.redl@getdesigned.at>

	Add (again) exception propagation support as per N2179.  Feature is
	available only when _GLIBCXX_ATOMIC_BUILTINS_4 is defined.
	* libsupc++/exception_ptr.h (exception_ptr, current_exception,
        copy_exception, rethrow_exception): New file, implement exception
	propagation.
        * libsupc++/eh_ptr.cc (exception_ptr, current_exception,
        rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
        * libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
	(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
        __cxa_free_dependent_exception, __get_dependent_exception_from_ue,
        __GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
        __gxx_dependent_exception_class, __get_object_from_ue,
        __get_object_from_ambiguous_exception): Add.
        (__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
        (__is_gxx_exception_class): Handle dependent exceptions.
        * libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
        * libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
        * libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
        * libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
        * libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
        __cxa_free_dependent_exception): Add.
        * libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
        counting.
        * libsupc++/exception: Conditionally include exception_ptr.h.
        * libsupc++/Makefile.am: Register new files.
        * libsupc++/Makefile.in: Regenerate.
        * config/abi/pre/gnu.ver: Add new symbols.
        * testsuite/18_support/exception_ptr/current_exception.cc: Test the
        core functionality of current_exception().
        * testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
        core functionality of rethrow_exception().
        * testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
        exception objects during exception propagation.

From-SVN: r139509
2008-08-23 11:28:30 +00:00
Paolo Carlini 9b410dd0ec 2008-08-22 Paolo Carlini <paolo.carlini@oracle.com>
Revert again the N2179 patch.

From-SVN: r139497
2008-08-22 18:59:41 +00:00
Sebastian Redl eb5712c966 eh_ptr.cc (__gxx_dependent_exception_cleanup): Call __cxa_free_dependent_exception.
2008-08-21  Sebastian Redl <sebastian.redl@getdesigned.at>

	* libsupc++/eh_ptr.cc (__gxx_dependent_exception_cleanup): Call
	__cxa_free_dependent_exception.

From-SVN: r139402
2008-08-21 17:37:23 +00:00
Paolo Carlini 2fb63453bd char_traits.h (char_traits<char16_t>:: assign(char_type*, size_t, char_type), [...]): For now, just open-code.
2008-08-20  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/char_traits.h (char_traits<char16_t>::
	assign(char_type*, size_t, char_type), char_traits<char32_t>::
	assign(char_type*, size_t, char_type)): For now, just open-code.

From-SVN: r139367
2008-08-21 01:06:45 +00:00
Paolo Carlini c532afbfff 2008-08-20 Paolo Carlini <paolo.carlini@oracle.com>
* Fix last ChangeLog entry.

From-SVN: r139341
2008-08-20 19:37:48 +00:00
Paolo Carlini 5e44d591c8 PR libstdc++/33979 (partial)
2008-08-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/33979 (partial)
	* include/bits/postypes.h (u16streampos, u32streampos): Add.
	* include/bits/char_traits.h (char_traits<char16_t>,
	char_traits<char32_t>): Add.
	* include/bits/stringfwd.h (u16string, u32string): Add.
	* include/ext/vstring_fwd.h: Add typedefs for char16_t/char32_t.
	* testsuite/21_strings/char_traits/requirements/char32_t/typedefs.cc:
	New.
	* testsuite/21_strings/char_traits/requirements/
	explicit_instantiation/short/1.cc: Likewise.
	* testsuite/21_strings/char_traits/requirements/
	explicit_instantiation/char32_t/1.cc: Likewise.
	* testsuite/21_strings/char_traits/requirements/
	explicit_instantiation/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/char_traits/requirements/
	explicit_instantiation/char16_t/1.cc: Likewise.
	* testsuite/21_strings/char_traits/requirements/
	explicit_instantiation/char/1.cc: Likewise.
	* testsuite/21_strings/char_traits/requirements/char16_t/typedefs.cc:
	Likewise.
	* testsuite/21_strings/basic_string/requirements/
	explicit_instantiation/char32_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string/requirements/
	explicit_instantiation/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string/requirements/
	explicit_instantiation/char16_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string/requirements/
	explicit_instantiation/char/1.cc: Likewise.
	* testsuite/21_strings/headers/string/types_std_c++0x.cc: Likewise.
	* testsuite/ext/vstring/requirements/explicit_instantiation/
	char32_t/1.cc: Likewise.
	* testsuite/ext/vstring/requirements/explicit_instantiation/
	char16_t/1.cc: Likewise.

From-SVN: r139339
2008-08-20 19:29:54 +00:00
Paolo Carlini b7e2f896db re PR testsuite/37149 (27_io/basic_ostream/inserters_other/char/error_code.cc)
2008-08-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/37149
	* testsuite/27_io/basic_ostream/inserters_other/char/4.cc: Include
	<cstdio>.
	* testsuite/27_io/basic_ostream/inserters_other/char/error_code.cc:
	Likewise.
	* testsuite/27_io/objects/char/12048-1.cc: Likewise.
	* testsuite/27_io/objects/char/12048-3.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/12048-1.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/12048-3.cc: Likewise.
	* testsuite/ext/malloc_allocator/deallocate_global.cc: Likewise.
	* testsuite/ext/malloc_allocator/deallocate_local.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_global-2.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_global-4.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local-2.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local-4.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local-6.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local-8.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local_thread-5.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local_thread-7.cc: Likewise.
	* testsuite/ext/new_allocator/deallocate_global.cc: Likewise.
	* testsuite/ext/new_allocator/deallocate_local.cc: Likewise.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Likewise.
	* include/std/regex: Include <sstream>.
	* include/tr1/regex: Likewise.

From-SVN: r139206
2008-08-18 17:48:15 +00:00
Paolo Carlini 3c7c6d39d0 configure.ac: Do not hardcode HAVE_S_ISREG and HAVE_S_IFREG for newlib.
2008-08-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* configure.ac: Do not hardcode HAVE_S_ISREG and HAVE_S_IFREG for
	newlib.
	* configure: Regenerate.

From-SVN: r139203
2008-08-18 16:21:18 +00:00
Paolo Carlini 5289e80852 re PR libstdc++/37147 (New failures: 20_util/ratio/comparisons/comp2.cc et al)
2008-08-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/37147
	* acinclude.m4 ([GLIBCXX_CHECK_C99_TR1]): Tighten checks on stdint.h,
	check the macros too.
	* configure: Regenerate.

From-SVN: r139200
2008-08-18 15:02:10 +00:00
Paolo Carlini 99bf8d167e acinclude.m4 ([AC_LC_MESSAGES]): Use AC_TRY_COMPILE instead of AC_TRY_LINK.
2008-08-17  Paolo Carlini  <paolo.carlini@oracle.com>

	* acinclude.m4 ([AC_LC_MESSAGES]): Use AC_TRY_COMPILE instead of
	AC_TRY_LINK.
	* configure.ac: Run unconditionally AC_LC_MESSAGES.
	* crossconfig.m4: Adjust.
	* configure: Regenerate.

From-SVN: r139171
2008-08-17 12:30:55 +00:00
Paolo Carlini 74745ec578 acinclude.m4 ([GLIBCXX_CHECK_LFS], [...]): Use GCC_TRY_COMPILE_OR_LINK instead of AC_TRY_LINK...
2008-08-17  Paolo Carlini  <paolo.carlini@oracle.com>

	* acinclude.m4 ([GLIBCXX_CHECK_LFS], [GLIBCXX_CHECK_POLL],
	[GLIBCXX_CHECK_S_ISREG_OR_S_IFREG], [GLIBCXX_CHECK_WRITEV]):
	Use GCC_TRY_COMPILE_OR_LINK instead of AC_TRY_LINK, in C++,
	with -fno-exceptions as flags.
	* configure.ac: Run unconditionally GLIBCXX_CHECK_LFS,
	GLIBCXX_CHECK_POLL, GLIBCXX_CHECK_S_ISREG_OR_S_IFREG,
	GLIBCXX_CHECK_WRITEV and commonized AC_CHECK_HEADERS. 
	* crossconfig.m4: Adjust; remove AC_CHECK_HEADERS commonized
	in configure.ac.
	* configure: Regenerate.

From-SVN: r139168
2008-08-17 10:19:34 +00:00
Paolo Carlini 6d419a6ef3 Re-instate last patch...
2008-08-13  Paolo Carlini  <paolo.carlini@oracle.com>

	Re-instate last patch, amended to use __exchange_and_add_dispatch
	and __atomic_add_dispatch in eh_ptr.cc and eh_throw.cc.

From-SVN: r139091
2008-08-14 01:17:09 +00:00
Paolo Carlini ec001bc928 2008-08-13 Paolo Carlini <paolo.carlini@oracle.com>
Revert the last patch.

From-SVN: r139074
2008-08-13 20:08:55 +00:00
Sebastian Redl 0292e6d2bb Add exception propagation support as per N2179.
2008-08-13  Sebastian Redl <sebastian.redl@getdesigned.at>

	Add exception propagation support as per N2179.
        * libsupc++/exception_ptr.h (exception_ptr, current_exception,
        copy_exception, rethrow_exception): New file, implement exception
	propagation.
        * libsupc++/eh_ptr.cc (exception_ptr, current_exception,
        rethrow_exception, __gxx_dependent_exception_cleanup): Likewise.
        * libsupc++/unwind-cxx.h (__cxa_exception): Add reference count.
	(__cxa_dependent_exception, __cxa_allocate_dependent_exception,
        __cxa_free_dependent_exception, __get_dependent_exception_from_ue,
        __GXX_INIT_DEPENDENT_EXCEPTION_CLASS, __is_dependent_exception,
        __gxx_dependent_exception_class, __get_object_from_ue,
        __get_object_from_ambiguous_exception): Add.
        (__GXX_INIT_EXCEPTION_CLASS, __gxx_exception_class): Rename.
        (__is_gxx_exception_class): Handle dependent exceptions.
        * libsupc++/eh_arm.cc (__cxa_type_match): Likewise.
        * libsupc++/eh_call.cc (__cxa_call_unexpected): Likewise.
        * libsupc++/eh_personality.cc (__gxx_personality_*): Likewise.
        * libsupc++/eh_type.cc (__cxa_current_exception_type): Likewise.
        * libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception,
        __cxa_free_dependent_exception): Add.
        * libsupc++/eh_throw.cc (__gxx_exception_cleanup): Handle reference
        counting.
        * libsupc++/exception: Conditionally include exception_ptr.h.
        * libsupc++/Makefile.am: Register new files.
        * libsupc++/Makefile.in: Regenerate.
        * config/abi/pre/gnu.ver: Add new symbols.
        * testsuite/18_support/exception_ptr/current_exception.cc: Test the
        core functionality of current_exception().
        * testsuite/18_support/exception_ptr/rethrow_exception.cc: Test the
        core functionality of rethrow_exception().
        * testsuite/18_support/exception_ptr/lifespan.cc: Test the life span of
        exception objects during exception propagation.

From-SVN: r139064
2008-08-13 18:14:51 +00:00
Paolo Carlini bbbd5025a1 re PR libstdc++/37100 (/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/bits/stl_pair.h:99: error 404)
2008-08-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/37100
	* include/bits/stl_pair.h: Fix documentation URL in comment.

From-SVN: r139040
2008-08-12 23:14:10 +00:00