Commit Graph

6841 Commits

Author SHA1 Message Date
François Dumont
4aa9afb41f 2.cc: Hide explicit instantiation with non default constructible type ...
2010-12-02  François Dumont  <francois.cppdevs@free.fr>                                                                                                                                                            
                                                                                                                                                                                                                   
	* testsuite/23_containers/vector/requirements/explicit_instantiation/                                                                                                                                      
	2.cc: Hide explicit instantiation with non default constructible type                                                                                                                                      
	in C++0x mode.                                                                                                                                                                                             
	* testsuite/23_containers/deque/requirements/explicit_instantiation/                                                                                                                                       
	2.cc: Likewise                                                                                                                                                                                             
	* testsuite/23_containers/list/requirements/explicit_instantiation/
	2.cc: Likewise.

From-SVN: r167391
2010-12-02 21:05:29 +00:00
Kai Tietz
266afdd60e re PR libstdc++/43738 (basic_file_stdio.cc uses ioctl on a fd, but not available on mingw32)
2010-12-02  Kai Tietz  <kai.tietz@onevision.com>

        PR libstdc++/43738
        * config/io/basic_file_stdio.cc (showmanyc): Check _GLIBCXX_NO_IOCTL
        before use of ioctl.
        * config/os/mingw32/os_defines.h (_GLIBCXX_NO_IOCTL): New.

From-SVN: r167369
2010-12-02 14:15:10 +01:00
François Dumont
7165791eb5 2.cc: Fix to explicitely invoke the copy construtor with or without C++0x mode.
2010-12-01  François Dumont  <francois.cppdevs@free.fr>

        * testsuite/23_containers/deque/cons/2.cc: Fix to explicitely invoke
        the copy construtor with or without C++0x mode.
        * testsuite/23_containers/vector/cons/4.cc: Likewise.

From-SVN: r167355
2010-12-01 20:51:38 +00:00
Rainer Orth
e1208a5799 extract_symvers.pl: New file.
* scripts/extract_symvers.pl: New file.
	* scripts/extract_symvers: Rename to ...
	* scripts/extract_symvers.in: ... this.
	Use extract_symvers.pl on SunOS.
	* configure.ac: Add scripts/extract_symvers to AC_CONFIG_FILES.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.am (extract_symvers): Call extract_symvers
	from $(glibcxx_builddir).
	* testsuite/Makefile.in: Regenerate.
	* testsuite/libstdc++-abi/abi.exp: Call extract_symvers from
	$objdir.

	* config/abi/post/solaris2.8/baseline_symbols.txt: Regenerate.
	* config/abi/post/solaris2.8/sparcv9/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.10/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Likewise.

From-SVN: r167330
2010-12-01 13:55:16 +00:00
Paolo Carlini
1e6734153b re PR libstdc++/46718 ([c++0x] nullptr_t must be scalar)
2010-11-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/46718
	* include/std/type_traits (__is_nullptr_t): Add.
	(is_scalar): Use the latter.
	* testsuite/20_util/is_scalar/value.cc: New.
	* testsuite/20_util/is_scalar/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_scalar/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.

From-SVN: r167294
2010-11-30 12:52:38 +00:00
Paolo Carlini
18af637ed9 re PR libstdc++/46683 (FAIL: ext/profile/all.cc)
2010-11-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/46683
	* testsuite/ext/profile/mh.cc: Move dg-require* directives to the end.
	* testsuite/ext/profile/all.cc: Likewise.

From-SVN: r167219
2010-11-28 10:22:55 +00:00
Jonathan Wakely
68f378af29 re PR libstdc++/46689 (FAIL: 20_util/shared_ptr/comparison/cmp.cc)
2010-11-28  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/46689
	* testsuite/20_util/shared_ptr/comparison/cmp.cc: Remove tests for
	invalid comparisons.

From-SVN: r167217
2010-11-28 01:32:57 +00:00
Jonathan Wakely
30fbbc7703 shared_ptr_base.h (operator>, [...]): Remove comparisons not specified in the C++0x draft.
2010-11-27  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/bits/shared_ptr_base.h (operator>, operator>=, operator<=):
	Remove comparisons not specified in the C++0x draft.

From-SVN: r167203
2010-11-27 18:32:08 +00:00
François Dumont
d3b8263e20 unordered_map (unordered_multimap<>::erase): Fix to erase all elements associated to the key.
2010-11-27  François Dumont  <francois.cppdevs@free.fr>

        * include/debug/unordered_map (unordered_multimap<>::erase): Fix to
        erase all elements associated to the key.
        * include/debug/unordered_set (unordered_multiset<>::erase): Likewise.
        * testsuite/23_containers/unordered_multimap/erase/1.cc: Modify to
        check for multiple erase.
        * testsuite/23_containers/unordered_multiset/erase/1.cc: Likewise.

From-SVN: r167199
2010-11-27 13:09:47 +00:00
François Dumont
d66411ba66 2010-11-27 François Dumont <francois.cppdevs@free.fr>
* include/debug/unordered_map, unordered_set (unordered_map<>::insert,
        unordered_multimap<>::insert, unordered_set<>::insert, 
        unordered_multiset<>::insert) Debug check iterator hint and pass it to
        normal implementation.

From-SVN: r167198
2010-11-27 12:51:58 +00:00
François Dumont
c5589aa7e1 bitset (bitset<>::reference): Clean code, use normal reference type in experimental mode.
2010-11-27  François Dumont  <francois.cppdevs@free.fr>

        * include/debug/bitset (bitset<>::reference): Clean code, use normal 
        reference type in experimental mode.
        * testsuite/23_containers/bitset/debug/invalid/1.cc: Fix for
        experimental mode.

From-SVN: r167196
2010-11-27 10:04:19 +00:00
Paolo Carlini
8a1ffe230e 2010-11-27 Paolo Carlini <paolo.carlini@oracle.com>
* Tweak last ChangeLog entry.

From-SVN: r167189
2010-11-26 23:03:36 +00:00
François Dumont
bcd93c00ab libstdc++.exp [...]: Use remote_file delete for generated exe.
2010-11-26  François Dumont  <francois.cppdevs@free.fr>

        * testsuite/lib/libstdc++.exp [check_v3_target_debug_mode]: Use
        remote_file delete for generated exe. [check_v3_target_profile_mode]
        Add.
        * testsuite/lib/dg-options.exp [dg-require-profile-mode]: Add
        * testsuite/ext/profile/mh.cc, profiler_algos.cc, all.cc: Use
        dg-require-profile-mode, remove explicit _GLIBCXX_PROFILE definition.

From-SVN: r167188
2010-11-26 20:29:01 +00:00
François Dumont
afe96d415d debug.cc: Introduce a mutex pool in get_safe_base_mutex.
2010-11-25  François Dumont  <francois.cppdevs@free.fr>

	* src/debug.cc: Introduce a mutex pool in get_safe_base_mutex.
	Move code used to manipulate sequence safe iterators from safe
	iterator methods to safe sequence ones. Remove usage of safe iterator
	mutex, keep _Safe_iterator_base::_M_get_mutex for library backward
	binary compatibility.
	* src/Makefile.am: Build debug.cc in gnu++0x mode for _Hash_impl usage.
	* src/Makefile.in: Regenerate
	* include/debug/safe_base.h: Add _Safe_iterator_base _M_invalidate
	and _M_reset. Add _Safe_sequence_base _M_attach, _M_attach_single,
	_M_detach and _M_detach_single.
	* include/debug.safe_iterator.h, safe_iterator.tcc: Remove
	_Safe_iterator _M_invalidate and _M_invalidate_single. Implement all
	methods in terms of normal iterators rather than safe ones.
	* include/debug/safe_sequence.h: Replace _Safe_sequence
	_M_transfe_iter with _M_transfer_from_if taking the source sequence
	and a predicate signaling when a safe iterator shall be transfered.
	Add _Equal_to predicate.
	* include/debug/safe_sequence.tcc: New.
	* include/Makefile.am: Adjust.
	* include/Makefile.in: Regenerate.
	* include/debug/forward_list: Swap safe iterators in move constructor.
	Do not invalidate before begin in _M_invalidate_all method.
	Reimplement safe methods using normal iterators rather than safe ones.
	* include/debug/set.h, unordered_map, multiset.h, vector,
	unordered_set, deque, map.h, list, multimap.h: Reimplement safe method
	using normal iterators rather than safe ones.
	* testsuite/23_containers/forward_list/debug/clear.cc, swap.cc,
	move_constructor.cc, splice_after.cc, splice_after1.cc,
	splice_after2.cc, splice_after3.cc, splice_after4.cc: New.
	* testsuite/23_containers/vector/debug/multithreaded_swap.cc: New.

From-SVN: r167152
2010-11-25 20:53:39 +00:00
Benjamin Kosnik
094a14eff7 tuple: Mark more constructors constexpr.
2010-11-24  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/tuple: Mark more constructors constexpr.
	* include/bits/stl_pair.h: Same.
	* testsuite/20_util/tuple/requirements/dr801.cc: New.
	* testsuite/20_util/pair/requirements/dr801.cc: New.
	* testsuite/20_util/tuple/cons/constexpr.cc: Add cases for new
	constexpr constructors.
	* testsuite/20_util/pair/cons/constexpr.cc: Same.
	* testsuite/20_util/pair/comparison_operators/constexpr.cc: New.

	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust line number.

From-SVN: r167118
2010-11-24 16:33:14 +00:00
Paolo Carlini
3f61a98253 constexpr.cc: Add dg-require* directives.
2010-11-24  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/30_threads/future/cons/constexpr.cc: Add dg-require*
	directives.
	* testsuite/30_threads/shared_future/cons/constexpr.cc: Likewise.

From-SVN: r167109
2010-11-24 10:08:49 +00:00
Benjamin Kosnik
85db9dcc30 chrono: Constexpr markup for is_monotonic.
2010-11-23  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/chrono: Constexpr markup for is_monotonic.
	* src/chrono.cc: Same.
	* testsuite/20_util/clocks/1.cc: Move...
	* testsuite/20_util/system_clock/1.cc: ...here.
	* testsuite/20_util/system_clock/constexpr_data.cc
	* testsuite/20_util/monotonic_clock/constexpr_data.cc

	* include/std/complex: Mark primary template constexpr.
	* testsuite/26_numerics/complex/cons/constexpr_primary.cc: Add.
	* testsuite/26_numerics/complex/complex_value.cc: Move...
	* testsuite/26_numerics/complex/dr387.cc: Move...
	* testsuite/26_numerics/complex/value_operations/1.cc: ... here.
	* testsuite/26_numerics/complex/value_operations/dr387.cc: ...here.
	* testsuite/26_numerics/complex/value_operations/constexpr.cc: New.

2010-11-23  Benjamin Kosnik  <bkoz@redhat.com>
	    Jason Merrill  <jason@redhat.com>

	* testsuite/lib/libstdc++.exp: Use scanasm.
	* testsuite/util/testsuite_common_types.h
	(constexpr_default_constructible): Add support for non-literal types.
	(constexpr_single_value_constructible): Same.
	* testsuite/20_util/enable_shared_from_this/cons/constexpr.cc:
	Remove xfail.
	* testsuite/20_util/shared_ptr/cons/constexpr.cc: Add.
	* testsuite/20_util/unique_ptr/cons/constexpr.cc: Add.
	* testsuite/20_util/weak_ptr/cons/constexpr.cc: Add.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust line number.

2010-11-23  Benjamin Kosnik  <bkoz@redhat.com>
	    Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/future (shared_future): Default ctor constexpr.
	(future): Same.
	* testsuite/30_threads/shared_future/cons/constexpr.cc: New.
	* testsuite/30_threads/future/cons/constexpr.cc: New.


Co-Authored-By: Jason Merrill <jason@redhat.com>
Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>

From-SVN: r167099
2010-11-23 23:47:44 +00:00
Uros Bizjak
d2627a2980 wrapped_locale.cc: Require additional locale name.
* testsuite/22_locale/collate/hash/char/wrapped_locale.cc: Require
	additional locale name.
	* testsuite/22_locale/collate/hash/char/wrapped_env.cc: Ditto.

From-SVN: r167078
2010-11-23 15:23:13 +01:00
Jonathan Wakely
9916a9e47b re PR libstdc++/46455 (resource leaks due to missing destructors for mutexes and condvars)
2010-11-18  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/46455
	* include/std/mutex: Define destructors for mutex types which use an
	init function.
	* include/ext/concurrence.h: Likewise.

From-SVN: r166917
2010-11-18 18:56:29 +00:00
Paolo Carlini
5e8c4585db 2010-11-18 Paolo Carlini <paolo.carlini@oracle.com>
Fix typo in the last ChangeLog entry.

From-SVN: r166913
2010-11-18 17:26:59 +00:00
Paolo Carlini
2ca2a8990a PR libstdc++/26211 + N3168
2010-11-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/26211 + N3168
	* include/bits/istream.tcc (basic_istream<>::tellg, seekg(pos_type),
	seekg(off_type, ios_base::seekdir)): Construct a sentry.
	(basic_istream<>::tellg, seekg(pos_type), seekg(off_type,
	ios_base::seekdir, putback, unget)): Clear eofbit first, per N3168.  
	* testsuite/27_io/basic_istream/seekg/char/26211.cc: New.
	* testsuite/27_io/basic_istream/seekg/wchar_t/26211.cc: Likewise.
	* testsuite/27_io/basic_istream/tellg/char/26211.cc: Likewise.
	* testsuite/27_io/basic_istream/tellg/wchar_t/26211.cc: Likewise.
	* testsuite/27_io/basic_istream/tellg/char/8348.cc: Tweak.
	* testsuite/27_io/basic_istream/tellg/wchar_t/8348.cc: Likewise.

From-SVN: r166911
2010-11-18 17:21:35 +00:00
H.J. Lu
8a510ddbcf Update expected demangler output.
2010-11-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR other/42670
	* testsuite/abi/demangle/regression/cw-13.cc: Updated.

From-SVN: r166903
2010-11-18 05:24:00 -08:00
Paolo Carlini
67c495be79 formatter.h (__truth): Remove, unused.
2010-11-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/debug/formatter.h (__truth): Remove, unused.
	(__is_same): Remove, include cpp_type_traits.h instead.
	(_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
	_Is_iterator)): Adjust.
	* include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant):
	Likewise.

From-SVN: r166900
2010-11-18 11:03:14 +00:00
François Dumont
3a3a1e7484 testsuite/lib/libstdc++.exp (check_v3_target_debug_mode): Clean built exe.
From-SVN: r166881
2010-11-17 21:33:50 +00:00
Ralf Wildenhues
9606fadbb5 PR libstdc++/45711 cleanup.
libstdc++-v3/:
        PR libstdc++/45711
        * src/Makefile.am (stamp-debug): Also adjust VPATH.
        * src/Makefile.in: Regenerate.

From-SVN: r166772
2010-11-15 21:39:09 +00:00
Jie Zhang
8679360a46 * testsuite/ext/profile/mh.cc: Add xfail for uclibc.
From-SVN: r166749
2010-11-15 11:01:20 +00:00
Matthias Klose
44e29e812b 13_ecmascript: Remove, empty directory.
2010-11-14  Matthias Klose  <doko@ubuntu.com>

        * testsuite/28_regex/13_ecmascript: Remove, empty directory.
        * testsuite/28_regex/02_definitions: Likewise.
        * testsuite/29_atomics/headers/stdatomic.h: Likewise.

From-SVN: r166736
2010-11-14 20:05:12 +00:00
Paolo Carlini
6b6d5d0922 stl_tree.h (_Rb_tree<>::_M_const_cast_iter): Remove.
2010-11-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/stl_tree.h (_Rb_tree<>::_M_const_cast_iter): Remove.
	(_Rb_tree_const_iterator<>::_M_const_cast): Add.
	(_Rb_tree<>::erase, _M_insert_unique_): Adjust.
	* include/debug/map.h (map<>::erase, insert): Fix C++0x signatures.
	* include/debug/multimap.h (multimap<>::erase, insert): Likewise.
	* include/debug/set.h (set<>::erase, insert): Fix, only cosmetic
	changes in this case.
	* include/debug/multiset.h (multiset<>::erase, insert): Likewise.
	* include/profile/set.h (set<>::insert): Remove redundant macro.
	* include/profile/multiset.h (multiset<>::insert): Likewise.
	* include/bits/stl_set.h (set<>::insert): Likewise.
	* include/bits/stl_multiset.h (multiset<>::insert): Likewise.

From-SVN: r166734
2010-11-14 18:41:01 +00:00
Ian Lance Taylor
759fe2404d re PR other/46332 (__cxa_demangle yields excess parentheses for function types)
libiberty/:
	PR other/46332
	* cp-demangle.c (d_print_function_type): Don't print parentheses
	if there are no modifiers to print.
	* testsuite/demangle-expected: Tweak one test case, add another.
libstdc++/:
	* testsuite/abi/demangle/abi_examples/14.cc (main): Change
	expected demangling.

From-SVN: r166695
2010-11-13 01:21:12 +00:00
Paolo Carlini
ad26988476 move.h (forward): Implement N3143, resolving US 90.
2010-11-11  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/move.h (forward): Implement N3143, resolving US 90.
	* testsuite/20_util/forward/a.cc: New.
	* testsuite/20_util/forward/b.cc: Likewise.
	* testsuite/20_util/forward/c_neg.cc: Likewise.
	* testsuite/20_util/forward/d.cc: Likewise.
	* testsuite/20_util/forward/e.cc: Likewise.
	* testsuite/20_util/forward/f_neg.cc: Likewise.

From-SVN: r166599
2010-11-11 13:10:49 +00:00
François Dumont
6d24de8354 unordered_map (unordered_map<>::_M_profile_size): Simplify, don't take a __new_size argument; adjust all callers.
2010-11-10  François Dumont  <francois.cppdevs@free.fr>

        * include/profile/unordered_map (unordered_map<>::_M_profile_size): 
        Simplify, don't take a __new_size argument; adjust all callers.

From-SVN: r166560
2010-11-10 21:53:43 +00:00
Paolo Carlini
e6a054481d PR libstdc++/44436 (partial)
2010-11-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/44436 (partial)
	PR libstdc++/46148
        * include/bits/stl_tree.h (_Rb_tree<>::_M_insert_, _M_insert_lower,
	_M_insert_equal_lower, _M_insert_unique, _M_insert_equal,
	_M_insert_unique_, _M_insert_equal_): Templatize in C++0x mode,
	use _GLIBCXX_FORWARD throughout.
        * include/bits/stl_map.h (map<>::insert(_Pair&&),
	insert(const_iterator, _Pair&&), operator[](key_type&&): Add.
        * include/bits/stl_set.h (set<>::insert(value_type&&),
	insert(const_iterator, value_type&&)): Likewise.
        * include/bits/stl_multimap.h (multimap<>::insert(_Pair&&),
	insert(const_iterator, _Pair&&)): Likewise.
        * include/bits/stl_multiset.h (multiset<>::insert(value_type&&),
	insert(const_iterator, value_type&&)): Likewise.
	* include/debug/set.h: Adjust.
        * include/debug/multiset.h: Likewise.
        * include/debug/map.h: Likewise.
        * include/debug/multimap.h: Likewise.
        * include/profile/set.h: Likewise.
        * include/profile/multiset.h: Likewise.
        * include/profile/map.h: Likewise.
        * include/profile/multimap.h: Likewise.
        * testsuite/23_containers/multimap/modifiers/insert/1.cc: New.
        * testsuite/23_containers/multimap/modifiers/insert/2.cc: Likewise.
        * testsuite/23_containers/multimap/modifiers/insert/3.cc: Likewise.
        * testsuite/23_containers/multimap/modifiers/insert/4.cc: Likewise.
        * testsuite/23_containers/set/modifiers/insert/2.cc: Likewise.
        * testsuite/23_containers/set/modifiers/insert/3.cc: Likewise.
        * testsuite/23_containers/multiset/modifiers/insert/3.cc: Likewise.
        * testsuite/23_containers/multiset/modifiers/insert/4.cc: Likewise.
        * testsuite/23_containers/map/modifiers/insert/2.cc: Likewise.
        * testsuite/23_containers/map/modifiers/insert/3.cc: Likewise.
        * testsuite/23_containers/map/modifiers/insert/4.cc: Likewise.
        * testsuite/23_containers/map/modifiers/insert/5.cc: Likewise.
        * testsuite/23_containers/map/element_access/2.cc: Likewise.
        * testsuite/23_containers/map/element_access/46148.cc: Likewise.

        * include/bits/hashtable.h: Trivial naming changes.

From-SVN: r166551
2010-11-10 19:08:49 +00:00
Paolo Carlini
1b4ec7f01e hashtable.h (_Hashtable<>::_Insert_Conv_Type, [...]): Change to private.
2010-11-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>::_Insert_Conv_Type,
	_Hashtable<>::_Insert_Return_Type): Change to private.

From-SVN: r166528
2010-11-10 11:19:21 +00:00
Jonathan Wakely
ef40b37106 unique_ptr.h: Use static_assert in constexpr constructors.
2010-11-10  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/bits/unique_ptr.h: Use static_assert in constexpr
	constructors.
	* testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc: Remove xfails.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
	line number.

From-SVN: r166525
2010-11-10 10:09:03 +00:00
François Dumont
de084f55c6 algobase.h (equal): Call parallel variant for applicable overloads.
2010-11-09  François Dumont  <francois.cppdevs@free.fr>
            Johannes Singler  <singler@kit.edu>

        * include/parallel/algobase.h (equal):  Call parallel variant
        for applicable overloads.


Co-Authored-By: Johannes Singler <singler@kit.edu>

From-SVN: r166494
2010-11-09 15:34:58 +00:00
Paolo Carlini
17da7b3783 stl_tree.h (_Rb_tree<>::_M_const_cast_iter): Add and use it throughout.
2010-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/stl_tree.h (_Rb_tree<>::_M_const_cast_iter): Add
	and use it throughout.

From-SVN: r166487
2010-11-09 13:21:39 +00:00
Paolo Carlini
c0f8c3b4f1 re PR libstdc++/46385 (FAIL: 20_util/weak_ptr/comparison/cmp_neg.cc)
2010-11-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/46385
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
	line number.

From-SVN: r166477
2010-11-09 09:49:14 +00:00
Jonathan Wakely
14b846de51 unique_ptr.h: Move misplaced static_assert and use tuple's constexpr constructor in constexpr...
2010-11-08  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/bits/unique_ptr.h: Move misplaced static_assert and use
	tuple's constexpr constructor in constexpr constructors.
	* testsuite/20_util/unique_ptr/cons/ptr_deleter.cc: New.
	* testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc: New.

From-SVN: r166460
2010-11-08 23:42:09 +00:00
Benjamin Kosnik
85f38b3ff3 user.cfg.in: Adjust scanned includes.
2010-11-08  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/doxygen/user.cfg.in: Adjust scanned includes.
	* include/std/forward_list: Make doxygen file markup unambiguous.

From-SVN: r166459
2010-11-08 23:12:24 +00:00
Jason Merrill
9e115cec97 Correct conversion/overflow behavior.
* cvt.c (ignore_overflows): Move here from typeck.c.
	(ocp_convert): Use it.
	(cp_fold_convert): Use it.  Don't call rvalue.
	* typeck.c (build_static_cast_1): Don't use it.  Do call rvalue.
	* error.c (location_of): Handle expressions, too.
	* class.c (check_bitfield_decl): Set input_location around call to
	cxx_constant_value.
	* semantics.c (cxx_eval_outermost_constant_expr): Don't
	print the expression if it already had TREE_OVERFLOW set.
	(reduced_constant_expression_p): Check TREE_OVERFLOW_P for C++98, too.
	(verify_constant): Allow overflow with a permerror if we're
	enforcing.
	(cxx_eval_outermost_constant_expr): Use verify_constant.
	(adjust_temp_type): Use cp_fold_convert.
	* decl.c (build_enumerator): Don't call constant_expression_warning.
	* decl2.c (grokbitfield): Likewise.

From-SVN: r166453
2010-11-08 15:17:42 -05:00
Benjamin Kosnik
6684c44386 complex (operator==, !=): Mark constexpr.
2010-11-08  Benjamin Kosnik  <bkoz@redhat.com>

        * include/std/complex (operator==, !=): Mark constexpr.
        * testsuite/26_numerics/complex/comparison_operators/constexpr.cc: New.

From-SVN: r166439
2010-11-08 16:18:10 +00:00
Paolo Carlini
7606bd1197 stl_tree.h (_Rb_tree<>::_M_erase_aux): Add.
2010-11-08  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/stl_tree.h (_Rb_tree<>::_M_erase_aux): Add.
	(_Rb_tree<>::erase(iterator)): Fix in C++0x mode to take
	const_iterator; remove redundant overload in C++03 mode.
	(_Rb_tree<>::erase(iterator, iterator)): Likewise.
	* include/bits/stl_map.h (map<>::erase): Adjust.
	(map<>::insert): Fix signature in C++0x mode.
	* include/bits/stl_set.h (set<>::erase): Likewise.
	(set<>::insert): Likewise.
	* include/bits/stl_multimap.h (multimap<>::erase): Likewise.
	(multimap<>::insert): Likewise.
	* include/bits/stl_multiset.h (multiset<>::erase): Likewise.
	(multiset<>::insert): Fix signature in C++0x mode.
	* include/profile/set.h: Adjust.
	* include/profile/multiset.h: Likewise.
	* include/profile/map.h: Likewise.
	* include/profile/multimap.h: Likewise.
	* testsuite/util/exception/safety.h (erase_base, insert_base):
	Update.

From-SVN: r166438
2010-11-08 16:07:32 +00:00
Paolo Carlini
be3c93b011 unordered_map (unordered_map<>::operator[](_Key&&)): Add.
2010-11-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/profile/unordered_map (unordered_map<>::operator[](_Key&&)):
	Add.

From-SVN: r166420
2010-11-07 18:56:56 +00:00
Paolo Carlini
52b8df0139 bitset (bitset<>::bitset(), [...]): Add constexpr specifier.
2010-11-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/profile/bitset (bitset<>::bitset(), bitset<>::
	bitset(unsigned long long)): Add constexpr specifier.

From-SVN: r166417
2010-11-07 16:08:09 +00:00
Paolo Carlini
17e3f4aa17 bitset: Do not derive from _Safe_sequence_base in C++0x mode...
2010-11-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/debug/bitset: Do not derive from _Safe_sequence_base in
	C++0x mode, otherwise std::bitset isn't a literal type anymore;
	adjust everywhere.

	* include/debug/bitset (bitset<>::bitset(), bitset<>::
	bitset(unsigned long long)):  Add missing constexpr specifier.

From-SVN: r166416
2010-11-07 15:15:28 +00:00
Benjamin Kosnik
cde9963161 user.cfg.in: Add typeindex.
2010-11-05  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/doxygen/user.cfg.in: Add typeindex.

	* testsuite/util/testsuite_common_types.h (constexpr_comparison_eq_ne,
	constexpr_comparison_operators): New.
	* testsuite/20_util/duration/comparisons: Move...
	* testsuite/20_util/duration/comparison_operators: ...here.
	* testsuite/20_util/duration/comparison_operators/constexpr.cc: New.
	* testsuite/20_util/time_point/comparison_operators/constexpr.cc: Add.

	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Adjust line
	numbers.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Same.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Same.

From-SVN: r166392
2010-11-06 03:35:46 +00:00
Paolo Carlini
be9d3d7342 shared_ptr.h (shared_ptr<>::__shared_ptr(), [...]): Add constexpr specifier.
2010-11-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/shared_ptr.h (shared_ptr<>::__shared_ptr(),
	shared_ptr<>::shared_ptr(nullptr_t), weak_ptr<>::weak_ptr(),
	enable_shared_from_this::enable_shared_from_this()): Add constexpr
	specifier.
	* include/bits/shared_ptr_base.h (__shared_count::__shared_count(),
	__shared_count::__shared_count(), __shared_ptr<>::__shared_ptr(),
	__shared_ptr<>::__shared_ptr(nullptr_t), __weak_ptr<>::__weak_ptr(),
	__enable_shared_from_this::__enable_shared_from_this()): Likewise.
	* include/bits/unique_ptr.h (default_delete,
	unique_ptr<>::unique_ptr(), unique_ptr<>::unique_ptr(nullptr_t)):
	Likewise.
	* testsuite/20_util/default_delete/cons/constexpr.cc: Do not xfail.
	* testsuite/20_util/shared_ptr/cons/constexpr.cc: Remove, the test
	cannot work for a non-literal type like std::shared_ptr.
	* testsuite/20_util/weak_ptr/cons/constexpr.cc: Likewise.
	* testsuite/util/testsuite_common_types.h: Add comments.
	* testsuite/20_util/unique_ptr/cons/constexpr.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/43820.cc: Adjust dg-error line
	numbers.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Likewise.

From-SVN: r166386
2010-11-06 00:11:57 +00:00
Benjamin Kosnik
f706cf1831 user.cfg.in: Remove tr1_impl headers.
2010-11-05  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/doxygen/user.cfg.in: Remove tr1_impl headers.

	* testsuite/tr1/4_metaprogramming/integral_constant/requirements/
	constexpr_data.cc: New.

	* testsuite/util/testsuite_tr1.h (LType, LTypeDerived, NLType): New.
	* testsuite/20_util/is_literal_type/value.cc: New.
	* testsuite/20_util/is_literal_type/requirements/typedefs.cc: Name.
	* testsuite/20_util/is_literal_type/requirements/
	explicit_instantiation.cc: New.

From-SVN: r166381
2010-11-05 22:30:54 +00:00
Paolo Carlini
76d0be83b2 re PR libstdc++/46303 ('mutex' is not a member of 'std' failures in 30_threads/call_once/constexpr.cc, 30_threads/mutex/cons/constexpr.cc, 30_threads/once_flag/cons/constexpr.cc)
2010-11-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/46303
	* testsuite/30_threads/call_once/constexpr.cc: Add missing dg-require
	directives.
	* testsuite/30_threads/mutex/cons/constexpr.cc: Likewise.
	* testsuite/30_threads/once_flag/cons/constexpr.cc: Likewise.

2010-11-04  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/ratio (ratio_add, ratio_subtract, ratio_multiply,
	ratio_divide): Declare the data members constexpr.
	* testsuite/20_util/ratio/requirements/constexpr_data.cc: Extend.

From-SVN: r166319
2010-11-04 17:02:25 +00:00
Benjamin Kosnik
0e6ac87eba tuple (tuple): Make default constructors constexpr.
2010-11-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/tuple (tuple): Make default constructors constexpr.
	* testsuite/20_util/tuple/cons/constexpr.cc: Add.

	* testsuite/18_support/initializer_list/requirements/
	constexpr_functions.cc: Add.
	* testsuite/18_support/initializer_list/constexpr.cc: Add.

From-SVN: r166301
2010-11-04 05:53:05 +00:00