Jonathan Wakely
64b07900f1
memory: Add feature-test macro.
...
* include/experimental/memory: Add feature-test macro.
* include/experimental/vector: Likewise.
* doc/xml/manual/status_cxx2017.xml: Update status.
* doc/html/manual/status.html: Regenerate.
From-SVN: r222707
2015-05-01 22:01:17 +01:00
Ville Voutilainen
261b7e8af2
Implement observer_ptr.
...
2015-05-01 Ville Voutilainen <ville.voutilainen@gmail.com>
Implement observer_ptr.
* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/experimental/memory: New.
* testsuite/experimental/memory/observer_ptr/assignment/assign.cc: New.
* testsuite/experimental/memory/observer_ptr/cons/cons.cc: New.
* testsuite/experimental/memory/observer_ptr/hash/hash.cc: New.
* testsuite/experimental/memory/observer_ptr/make_observer.cc: New.
* testsuite/experimental/memory/observer_ptr/relops/relops.cc: New.
* testsuite/experimental/memory/observer_ptr/requirements.cc: New.
* testsuite/experimental/memory/observer_ptr/swap/swap.cc: New.
* testsuite/experimental/memory/observer_ptr/typedefs.cc: New.
From-SVN: r222706
2015-05-01 22:01:11 +01:00
Jonathan Wakely
4ad376273d
* src/filesystem/path.cc (path::compare): Do not copy strings.
...
From-SVN: r222704
2015-05-01 21:05:42 +01:00
Jonathan Wakely
bf53e6a9dd
acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Disable when <dirent.h> is not available.
...
* acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Disable when <dirent.h>
is not available.
(GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for fchmodat.
* configure: Regenerate.
* config.h.in: Regenerate.
* configure.ac: Check for utime.h
* include/experimental/fs_path.h (path::string<>)
[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove stray typename keyword.
* src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H] (DIR, opendir,
closedir, dirent, readdir_r): Replace dummy functions with #error.
(native_readdir, _Dir::advance): Use readdir when readdir_r is missing.
* src/filesystem/ops.cc (do_stat, is_set): Make inline.
(last_write_time) [!_GLIBCXX_USE_UTIMENSAT]: Use utime.
(permissions) [!_GLIBCXX_USE_FCHMODAT]: Use chmod.
(space, temp_directory_path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Set
error_code.
From-SVN: r222703
2015-05-01 20:48:00 +01:00
Jonathan Wakely
a00d74c490
fs_path.h (path::_List): Use vector instead of list.
...
* include/experimental/fs_path.h (path::_List): Use vector instead of
list.
* python/libstdcxx/v6/printers.py (StdExpPathPrinter): Adapt.
* src/filesystem/path.cc: Use std::prev instead of decrementing
rvalues. Fix whitespace.
* testsuite/experimental/filesystem/path/decompose/parent_path.cc:
Do not decrement iterators before begin.
From-SVN: r222702
2015-05-01 20:47:55 +01:00
Jonathan Wakely
d6e023f3a0
fs_dir.h: Fix use of non-reserved names.
...
* include/experimental/fs_dir.h: Fix use of non-reserved names.
* include/experimental/fs_ops.h: Likewise.
* include/experimental/fs_path.h: Likewise.
* testsuite/lib/libstdc++.exp (check_v3_target_filesystem_ts): Use
C++11 when checking for support.
From-SVN: r222695
2015-05-01 18:55:33 +01:00
Jonathan Wakely
e9cd006414
locale_classes.h (locale::facet): Delete copy operations in C++11 mode.
...
* include/bits/locale_classes.h (locale::facet): Delete copy
operations in C++11 mode.
From-SVN: r222694
2015-05-01 17:50:31 +01:00
Jonathan Wakely
ff0164b48b
* include/bits/alloc_traits.h (__alloc_rebind): Change parameter name.
...
From-SVN: r222686
2015-05-01 16:22:49 +01:00
Jonathan Wakely
ce1b114a9c
acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Disable for solaris.
...
* acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Disable for solaris.
* configure: Regenerate.
From-SVN: r222685
2015-05-01 16:11:05 +01:00
Edward Smith-Rowland
ea365e01ef
Inline one-line erasure dispatch functions.
...
2015-05-01 Edward Smith-Rowland <3dw4rd@verizon.net>
Inline one-line erasure dispatch functions.
* include/experimental/forward_list (erase_if(), erase()): Inline.
* include/experimental/list (erase_if(), erase()): Inline.
* include/experimental/map (erase_if(*)): Inline.
* include/experimental/set (erase_if(*)): Inline.
* include/experimental/string (erase_if(), erase()): Inline.
* include/experimental/unordered_map (erase_if(*)): Inline.
* include/experimental/unordered_set (erase_if(*)): Inline.
From-SVN: r222684
2015-05-01 15:00:46 +00:00
Jonathan Wakely
1d15ed75ab
intro.xml: Link to new status_cxx2017.xml file.
...
* doc/xml/manual/intro.xml: Link to new status_cxx2017.xml file.
* doc/xml/manual/status_cxx2011.xml: Update status tables.
* doc/xml/manual/status_cxx2014.xml: Likewise.
* doc/xml/manual/status_cxx2017.xml: New.
* doc/xml/manual/using.xml: Fix typo.
* doc/html/*: Regenerate.
From-SVN: r222675
2015-05-01 12:02:24 +01:00
Jonathan Wakely
6fc456c36b
memory (pointer_safety, [...]): Define.
...
* include/std/memory (pointer_safety, declare_reachable,
undeclare_reachable, declare_no_pointers, undeclare_no_pointers,
get_pointer_safety): Define.
* testsuite/20_util/pointer_safety/1.cc: New.
From-SVN: r222674
2015-05-01 12:02:18 +01:00
Jonathan Wakely
0ca7ba9aa6
Implement N4100 File System TS
...
* acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Define.
(GLIBCXX_CHECK_FILESYSTEM_DEPS): Define.
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac: Enable filesystem TS and check its dependencies.
* include/Makefile.am: Add new headers.
* include/Makefile.in: Regenerate.
* include/bits/locale_conv.h (__do_str_code_cvt, __str_codecvt_in,
__str_codecvt_out): Move code conversion logic from wstring_convert
into new global functions.
(wstring_convert::to_bytes, wstring_convert::from_bytes): Use new
functions.
(wstring_convert::_M_conv): Remove.
* include/bits/quoted_string.h (_Quoted_string): Split out of iomanip.
* include/experimental/filesystem: New.
* include/experimental/fs_dir.h: New.
* include/experimental/fs_fwd.h: New.
* include/experimental/fs_ops.h: New.
* include/experimental/fs_path.h: New.
* include/std/iomanip (_Quoted_string): Move to bits/quoted_string.h.
* python/libstdcxx/v6/printers.py (StdExpPathPrinter): Add.
* src/Makefile.am (SUBDIRS): Add filesystem.
* src/Makefile.in: Regenerate.
* src/filesystem/Makefile.am: New.
* src/filesystem/Makefile.in: New.
* src/filesystem/dir.cc: New.
* src/filesystem/ops.cc: New.
* src/filesystem/path.cc: New.
* testsuite/experimental/filesystem/operations/absolute.cc: New.
* testsuite/experimental/filesystem/operations/copy.cc: New.
* testsuite/experimental/filesystem/operations/current_path.cc: New.
* testsuite/experimental/filesystem/path/append/path.cc: New.
* testsuite/experimental/filesystem/path/assign/assign.cc: New.
* testsuite/experimental/filesystem/path/assign/copy.cc: New.
* testsuite/experimental/filesystem/path/compare/compare.cc: New.
* testsuite/experimental/filesystem/path/compare/path.cc: New.
* testsuite/experimental/filesystem/path/compare/strings.cc: New.
* testsuite/experimental/filesystem/path/concat/path.cc: New.
* testsuite/experimental/filesystem/path/concat/strings.cc: New.
* testsuite/experimental/filesystem/path/construct/copy.cc: New.
* testsuite/experimental/filesystem/path/construct/default.cc: New.
* testsuite/experimental/filesystem/path/construct/locale.cc: New.
* testsuite/experimental/filesystem/path/construct/range.cc: New.
* testsuite/experimental/filesystem/path/decompose/extension.cc: New.
* testsuite/experimental/filesystem/path/decompose/filename.cc: New.
* testsuite/experimental/filesystem/path/decompose/parent_path.cc:
New.
* testsuite/experimental/filesystem/path/decompose/relative_path.cc:
New.
* testsuite/experimental/filesystem/path/decompose/root_directory.cc:
New.
* testsuite/experimental/filesystem/path/decompose/root_name.cc:
New.
* testsuite/experimental/filesystem/path/decompose/root_path.cc:
New.
* testsuite/experimental/filesystem/path/decompose/stem.cc: New.
* testsuite/experimental/filesystem/path/generic/generic_string.cc:
New.
* testsuite/experimental/filesystem/path/itr/traversal.cc: New.
* testsuite/experimental/filesystem/path/modifiers/clear.cc: New.
* testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
New.
* testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
New.
* testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
New.
* testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
New.
* testsuite/experimental/filesystem/path/modifiers/swap.cc: New.
* testsuite/experimental/filesystem/path/nonmember/hash_value.cc: New.
* testsuite/experimental/filesystem/path/query/empty.cc: New.
* testsuite/experimental/filesystem/path/query/has_extension.cc: New.
* testsuite/experimental/filesystem/path/query/has_filename.cc: New.
* testsuite/experimental/filesystem/path/query/has_parent_path.cc:
New.
* testsuite/experimental/filesystem/path/query/has_relative_path.cc:
New.
* testsuite/experimental/filesystem/path/query/has_root_directory.cc:
New.
* testsuite/experimental/filesystem/path/query/has_root_name.cc:
New.
* testsuite/experimental/filesystem/path/query/has_root_path.cc:
New.
* testsuite/experimental/filesystem/path/query/has_stem.cc: New.
* testsuite/experimental/filesystem/path/query/is_relative.cc: New.
* testsuite/util/testsuite_fs.h: New.
From-SVN: r222654
2015-04-30 20:11:52 +01:00
Edward Smith-Rowland
c0b12dad93
Add fundamentals TR container erasure.
...
2015-04-30 Edward Smith-Rowland <3dw4rd@verizon.net>
Add fundamentals TR container erasure.
* include/Makefile.am: Add new headers.
* include/Makefile.in: Add new headers.
* include/experimental/array: New.
* include/experimental/deque: New.
* include/experimental/erase_if.tcc: New.
* include/experimental/forward_list: New.
* include/experimental/list: New.
* include/experimental/map: New.
* include/experimental/set: New.
* include/experimental/string: New.
* include/experimental/unordered_map: New.
* include/experimental/unordered_set: New.
* include/experimental/vector: New.
* testsuite/experimental/deque/erasure.cc: New.
* testsuite/experimental/forward_list/erasure.cc: New.
* testsuite/experimental/list/erasure.cc: New.
* testsuite/experimental/map/erasure.cc: New.
* testsuite/experimental/set/erasure.cc: New.
* testsuite/experimental/string/erasure.cc: New.
* testsuite/experimental/unordered_map/erasure.cc: New.
* testsuite/experimental/unordered_set/erasure.cc: New.
* testsuite/experimental/vector/erasure.cc: New.
From-SVN: r222630
2015-04-30 14:43:19 +00:00
François Dumont
e1c444fef0
2015-04-30 François Dumont <fdumont@gcc.gnu.org>
...
* include/bits/cpp_type_traits.h
(__gnu_cxx::__is_normal_iterator): Delete.
* include/bits/stl_algobase.h (std::__niter_base): Adapt.
* include/bits/stl_iterator.h (__make_reverse_iterator): New in C++11.
(std::__niter_base): Overloads for std::reverse_iterator,
__gnu_cxx::__normal_iterator and std::move_iterator.
From-SVN: r222617
2015-04-30 11:36:52 +00:00
François Dumont
2f132d1d2c
hashtable_policy.h (_Prime_rehash_policy::_S_n_primes): Delete.
...
2015-04-30 François Dumont <fdumont@gcc.gnu.org>
* include/bits/hashtable_policy.h (_Prime_rehash_policy::_S_n_primes):
Delete.
* src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
Remove usage of latter and compute size of the prime numbers array
locally.
From-SVN: r222611
2015-04-30 07:13:37 +00:00
Doug Evans
8996b63b09
re PR libstdc++/65839 (xmethods need updating once gdb decides how to fix 18285)
...
PR libstdc++/65839
* python/libstdcxx/v6/xmethods.py (get_bool_type): New function.
Replace all lookups of "bool" with this.
(get_std_size_type): New function. Replace all lookups of std::size_t
with this.
(*Worker): New method get_result_type.
(DequeWorkerBase.__init__): New arg val_type. All callers updated.
(ListWorkerBase.__init__): New arg val_type. All callers updated.
(UniquePtrGetWorker.__init__): New arg elem_type. All callers updated.
Delete setting of name, enabled.
(UniquePtrDerefWorker.__init__): New arg elem_type. All callers
updated. Delete setting of name.
(UniquePtrMethodsMatcher): Rewrite for consistency with all other
libstdc++ xmethod matchers.
* testsuite/libstdc++-xmethods/array.cc: Add whatis tests.
* testsuite/libstdc++-xmethods/associative-containers.cc: Ditto.
* testsuite/libstdc++-xmethods/deque.cc: Ditto.
* testsuite/libstdc++-xmethods/forwardlist.cc: Ditto.
* testsuite/libstdc++-xmethods/list.cc: Ditto.
* testsuite/libstdc++-xmethods/unique_ptr.cc: Ditto.
* testsuite/libstdc++-xmethods/vector.cc: Ditto.
From-SVN: r222599
2015-04-29 22:50:31 +00:00
Doug Evans
b693b8792e
Use consistent naming for value type attributes.
...
* python/libstdcxx/v6/xmethods.py (ArrayWorkerBase): Rename _valtype
to _val_type.
(ArraySizeWorker, ArrayEmptyWorker): Ditto.
(ArrayFrontWorker, ArrayBackWorker): Ditto.
(ArrayAtWorker, ArraySubscriptWorker): Ditto.
(DequeWorkerBase): Rename elemtype to val_type.
(ForwardListWorkerBase): Rename _elem_type to _val_type.
(ForwardListFrontWorker): Ditto. And rename elem_address to
val_address.
(ForwardListMethodsMatcher): Rename elem_type to val_type.
(VectorWorkerBase): Rename _elemtype to _val_type.
From-SVN: r222596
2015-04-29 21:57:04 +00:00
Jonathan Wakely
952bc7a64c
re PR libstdc++/65760 (invalid use of incomplete type with std::is_convertible<C, C>)
...
PR libstdc++/65760
* include/std/functional (__check_func_return_type): Use is_same to
avoid using _is_convertible on incomplete types.
* testsuite/20_util/function/65760.cc: New.
From-SVN: r222581
2015-04-29 17:07:47 +01:00
Jonathan Wakely
f970a17d6f
re PR libstdc++/64657 (Support iterators with overloaded operator-comma)
...
PR libstdc++/64657
* include/bits/basic_string (basic_string::_S_copy_chars): Cast
expression to void.
* include/bits/locale_facets_nonio.tcc (money_get::_M_extract,
time_get::_M_extract_num, time_get::_M_extract_name,
time_get::_M_extract_wday_or_month): Likewise.
* include/bits/stl_algo.h (__includes, __replace_copy_if,
__is_sorted_until, __is_permutation, transform): Likewise.
* include/bits/stl_algobase.h (swap_ranges, __copy_move::__copy_m,
__equal::equal, __lexicographical_compare_impl, equal): Likewise.
* include/bits/stl_numeric.h (inner_product): Likewise.
* include/bits/stl_uninitialized.h (__uninitialized_copy_a): Likewise.
* testsuite/util/testsuite_iterators.h (output_iterator_wrapper,
input_iterator_wrapper): Declare unusable comma operator.
* testsuite/21_strings/basic_string/cons/char/64657.cc: New.
* testsuite/21_strings/basic_string/modifiers/assign/char/64657.cc:
New.
From-SVN: r222579
2015-04-29 16:22:13 +01:00
Doug Evans
874ef163cf
list.cc (_GLIBCXX_USE_CXX11_ABI): Define to zero.
...
* testsuite/libstdc++-xmethods/list.cc (_GLIBCXX_USE_CXX11_ABI):
Define to zero.
From-SVN: r222556
2015-04-29 00:17:09 +00:00
Jonathan Wakely
2e7e2075d1
stl_algo.h (random_shuffle): Only define for hosted implementations.
...
* include/bits/stl_algo.h (random_shuffle): Only define for hosted
implementations.
From-SVN: r222542
2015-04-28 20:42:56 +01:00
Jonathan Wakely
0088583b25
Makefile.am (SUBDIRS): Move python to hosted_source.
...
* Makefile.am (SUBDIRS): Move python to hosted_source.
* Makefile.in: Regenerate.
* acinclude.m4 (glibcxx_SUBDIRS): Reorder.
* configure: Regenerate.
From-SVN: r222541
2015-04-28 20:42:51 +01:00
Marc Glisse
fa9ac91269
re PR libstdc++/65883 (numeric_limits<unsigned __int128>::max() returns incorrect value)
...
2015-04-28 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/65883
* include/std/limits (numeric_limits): Add missing unsigned.
From-SVN: r222540
2015-04-28 19:35:49 +00:00
Stephan Bergmann
77e9546989
vector (_Safe_vector::operator=): Add missing returns.
...
2015-04-28 Stephan Bergmann <sbergman@redhat.com>
* include/debug/vector (_Safe_vector::operator=): Add missing returns.
From-SVN: r222532
2015-04-28 16:05:27 +01:00
Jonathan Wakely
73d81d3a6b
re PR libstdc++/60333 (type_traits make_signed, make_unsigned missing support for long long enumerations)
...
PR libstdc++/60333
* include/std/type_traits (__make_unsigned_selector<_Tp, false, true>):
Handle enumeration types larger than sizeof(long).
(__make_signed_selector<_Tp, false, true>): Find unsigned type then
make it signed.
* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
Likewise.
* testsuite/20_util/make_signed/requirements/typedefs-3.cc: New.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
dg-error.
* testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: New.
From-SVN: r222526
2015-04-28 14:21:54 +01:00
Jonathan Wakely
956d18149e
re PR libstdc++/61645 (forward_list::splice_after shall not throw exceptions)
...
PR libstdc++/61645
* include/bits/forward_list.h (forward_list::splice_after): Add
noexcept.
* include/bits/forward_list.tcc (forward_list::splice_after):
Likewise.
From-SVN: r222525
2015-04-28 14:05:33 +01:00
Jonathan Wakely
d747ee05e3
re PR libstdc++/65631 (seed_seq should not be copyable)
...
PR libstdc++/65631
* include/bits/random.h (seed_seq) Define copy constructor and copy
assignment as deleted.
* testsuite/26_numerics/random/seed_seq/cons/65631.cc: New.
From-SVN: r222524
2015-04-28 13:35:30 +01:00
Jonathan Wakely
196e0493cb
exception (uncaught_exceptions): Add comment.
...
* libsupc++/exception (uncaught_exceptions): Add comment. Reorder #if.
* testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
Use -std=gnu++1z. Check feature-test macro.
From-SVN: r222523
2015-04-28 13:07:40 +01:00
Jonathan Wakely
bd1eb5e092
type_traits (void_t): Add.
...
* include/std/type_traits (void_t): Add.
* testsuite/20_util/void_t/1.cc: New.
From-SVN: r222522
2015-04-28 13:07:34 +01:00
Tim Shen
e4846be7dd
regex.tcc: Handle regex_constants::__polynomial.
...
* include/bits/regex.tcc: Handle regex_constants::__polynomial.
* include/bits/regex_automaton.tcc: Throw exception when parsing
back-reference with flag __polynomial.
* include/bits/regex_constants.h: Add extension flag
syntax_option_type __polynomial.
* bits/regex_executor.tcc: Still let BFS process ECMAScript.
Alternative operation will be fixed in the coming refactoring.
* testsuite/28_regex/algorithms/regex_search/61424.cc: Turn
loose match_search_debug to use DFS only.
From-SVN: r222500
2015-04-28 04:16:48 +00:00
Sandra Loosemore
1a9f259288
re PR libstdc++/65909 (check_v3_target_namedlocale blows up on targets that don't support command-line arguments)
...
2015-04-27 Sandra Loosemore <sandra@codesourcery.com>
PR libstdc++/65909
libstdc++-v3/
* testsuite/lib/libstdc++.exp (check_v3_target_namedlocale):
Make the generated test program fail gracefully if the target
doesn't support passing command-line arguments.
From-SVN: r222497
2015-04-27 22:40:56 -04:00
Federico Lenarduzzi
03e73da676
eh_catch.cc (uncaught_exception, [...]): Return false or zero if the library is built without exceptions.
...
2015-04-27 Federico Lenarduzzi <federico.lenarduzzi@tallertechnologies.com>
Jonathan Wakely <jwakely@redhat.com>
* libsupc++/eh_catch.cc (uncaught_exception, uncaught_exceptions):
Return false or zero if the library is built without exceptions.
* libsupc++/eh_term_handler.cc: Disable verbose terminate handler if
the library is built without exceptions.
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r222484
2015-04-27 22:06:17 +01:00
Ville Voutilainen
913ae610c2
gnu.ver: Fix comment.
...
2015-04-27 Ville Voutilainen <ville.voutilainen@gmail.com>
* config/abi/pre/gnu.ver: Fix comment.
From-SVN: r222483
2015-04-27 21:52:14 +01:00
Ville Voutilainen
03a16cc404
Add support for std::uncaught_exceptions.
...
2015-04-27 Ville Voutilainen <ville.voutilainen@gmail.com>
Add support for std::uncaught_exceptions.
* acinclude.m4: Bump libtool_VERSION.
* config/abi/pre/gnu.ver: Export the new symbol.
* configure: Regenerate.
* libsupc++/eh_catch.cc (uncaught_exceptions): New.
* libsupc++/exception (uncaught_exceptions): New.
* testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc: New.
* testsuite/util/testsuite_abi.cc: Add 3.4.22 as the latest version.
From-SVN: r222482
2015-04-27 21:40:29 +01:00
Dmitry Prokoptsev
f5eedc3915
re PR libstdc++/62258 (uncaught_exception() equals to `true' after rethrow_exception())
...
2015-04-27 Dmitry Prokoptsev <dprokoptsev@gmail.com>
Michael Hanselmann <public@hansmi.ch>
PR libstdc++/62258
* libsupc++/eh_ptr.cc (rethrow_exception): Increment count of
uncaught exceptions.
* testsuite/18_support/exception_ptr/62258.cc: New.
Co-Authored-By: Michael Hanselmann <public@hansmi.ch>
From-SVN: r222480
2015-04-27 20:44:30 +01:00
Jonathan Wakely
991607ab25
extensions.xml: Add cross-reference.
...
* doc/xml/manual/extensions.xml: Add cross-reference.
* doc/html/manual/ext_compile_checks.html: Regenerate.
From-SVN: r222462
2015-04-27 13:30:26 +01:00
Szabolcs Nagy
85da5c3024
libstdc++, libgfortran gthr workaround for musl
...
On behalf of szabolcs.nagy@arm.com
[libstdc++-v3/]
2015-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
* config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define.
* configure.host (os_include_dir): Set to "os/generic" for linux-musl*.
[libgfortran/]
2015-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
* acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*.
* configure: Regenerate.
From-SVN: r222329
2015-04-22 14:24:11 +00:00
Renlin Li
04934297b8
[PATCH][libstc++v3]Add new dg-require-thread-fence directive.
...
libstdc++-v3/
2015-04-22 Renlin Li <renlin.li@arm.com>
* testsuite/lib/dg-options.exp (dg-require-thread-fence): New.
* testsuite/lib/libstdc++.exp (check_v3_target_thread_fence): New.
* testsuite/29_atomics/atomic_flag/clear/1.cc: Use it.
* testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc: Likewise.
* testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc: Likewise.
From-SVN: r222324
2015-04-22 14:01:02 +00:00
Jonathan Wakely
8a29fdfd23
configure.xml: Update descriptions of options affecting dual ABI and add cross-references.
...
* doc/xml/manual/configure.xml: Update descriptions of options
affecting dual ABI and add cross-references.
* doc/xml/manual/strings.xml: Clarify that string isn't COW now.
* doc/xml/manual/using.xml: Document ABI transition.
* doc/html/*: Regenerate.
From-SVN: r222262
2015-04-21 11:38:43 +01:00
Jonathan Wakely
0ee59f1f05
abi.xml: Use uppercase for C++ Standard Library.
...
* doc/xml/manual/abi.xml: Use uppercase for C++ Standard Library.
* doc/xml/manual/using.xml: Document newer -std options. Use better
examples of nested namespaces.
From-SVN: r222261
2015-04-21 11:27:18 +01:00
Jonathan Wakely
9adc2d48ac
concurrency_extensions.xml: Update documentation on atomics.
...
* doc/xml/manual/concurrency_extensions.xml: Update documentation
on atomics.
* doc/xml/manual/using.xml: Likewise. Improve markup.
* doc/html/*: Regenerate.
From-SVN: r222230
2015-04-20 12:07:50 +01:00
Rainer Orth
eea6e98958
Ignore elfdump warnings in scripts/extract_symvers.pl
...
* scripts/extract_symvers.pl: Ignore elfdump error output.
From-SVN: r222117
2015-04-15 07:48:59 +00:00
Marc Glisse
194571f10e
re PR libstdc++/61347 (std::distance(list.first(),list.end()) in O(1))
...
2015-04-14 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/61347
* include/bits/stl_iterator_base_funcs.h (_List_iterator,
_List_const_iterator): Declare.
(__distance): Declare new overloads for _List_iterator and
_List_const_iterator.
* include/bits/stl_list.h (__distance): New overloads for
_List_iterator and _List_const_iterator.
* testsuite/23_containers/list/61347.cc: New testcase.
From-SVN: r222082
2015-04-14 11:02:48 +00:00
Jonathan Wakely
453e2916ce
evolution.xml: Fix typos.
...
* doc/xml/manual/evolution.xml: Fix typos.
* doc/html/manual/api.html: Regenerate.
From-SVN: r222081
2015-04-14 11:08:58 +01:00
Hans-Peter Nilsson
0357625940
Fix regression for libstdc++-v3/testsuite/29_atomics/atomic/62259.cc as...
...
Fix regression for libstdc++-v3/testsuite/29_atomics/atomic/62259.cc
as reported at <http://gcc.gnu.org/ml/gcc-patches/2015-04/msg00543.html >.
* testsuite/29_atomics/atomic/62259.cc: Assert atomic
alignment is larger-equal, not equal, to default alignment.
From-SVN: r222072
2015-04-14 00:37:57 +00:00
Jonathan Wakely
1fcbcb6b26
re PR libstdc++/65754 (missing exports for fstream constructors)
...
PR libstdc++/65754
* config/abi/pre/gnu.ver: Export base object constructors for
fstreams.
* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update
* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/solaris2.10/baseline_symbols.txt: Regenerate.
* config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Likewise.
* config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Likewise.
* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Update.
* testsuite/27_io/basic_fstream/cons/base.cc: New.
From-SVN: r222059
2015-04-13 19:41:42 +01:00
Jonathan Wakely
040175d59c
evolution.xml: Document changes since 4.5 release.
...
* doc/xml/manual/evolution.xml: Document changes since 4.5 release.
* doc/html/*: Regenerate.
From-SVN: r222055
2015-04-13 17:21:33 +01:00
Uros Bizjak
a57013168d
baseline_symbols.txt: Update.
...
* config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
From-SVN: r222018
2015-04-12 08:40:39 +02:00
Andreas Schwab
cb86fa2234
* config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
...
From-SVN: r221987
2015-04-10 20:07:09 +00:00
Andreas Schwab
2fb17d35e4
* config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
...
From-SVN: r221986
2015-04-10 20:05:48 +00:00
Jonathan Wakely
cd80c79ce7
test.xml: Improve documentation on running a subset of tests.
...
* doc/xml/manual/test.xml: Improve documentation on running a subset
of tests.
* doc/html/manual/test.html: Regenerate.
From-SVN: r221985
2015-04-10 20:59:32 +01:00
Bill Schmidt
00778bed5f
baseline_symbols.txt: Update for GCC 5.1 release.
...
2015-04-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update
for GCC 5.1 release.
* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt:
Likewise.
From-SVN: r221974
2015-04-10 13:43:09 +00:00
Jonathan Wakely
c3d71b62c6
shared_mutex (shared_timed_mutex): Only use pthread_rwlock_t when the POSIX Timeouts option is supported.
...
* include/std/shared_mutex (shared_timed_mutex): Only use
pthread_rwlock_t when the POSIX Timeouts option is supported.
* testsuite/30_threads/shared_lock/cons/5.cc: Remove
dg-require-gthreads-timed.
* testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
* testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
* testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
From-SVN: r221971
2015-04-10 10:00:00 +01:00
Jonathan Wakely
43b0e124e4
shared_mutex (shared_timed_mutex): Add comments to explain the logic in the non-pthread_rwlock_t version.
...
* include/std/shared_mutex (shared_timed_mutex): Add comments to
explain the logic in the non-pthread_rwlock_t version.
(_Mutex): Remove redundant type.
(_M_n_readers): Rename to _S_max_readers.
(_M_write_entered, _M_readers): New convenience functions.
(lock, lock_shared, try_lock_shared, unlock_shared): Use convenience
functions. Use predicates with condition variables. Simplify bitwise
operations.
(try_lock_for, try_shared_lock_for): Convert duration to time_point
and call try_lock_until or try_shared_lock_until respectively.
(try_lock_until, try_shared_lock_until): Wait on the condition
variables until the specified time passes.
(unlock): Add Debug Mode assertion.
(unlock_shared): Add Debug Mode assertion.
* testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: New.
From-SVN: r221970
2015-04-10 09:59:54 +01:00
H.J. Lu
1bf137444b
Update x32 baseline_symbols.txt
...
* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Update.
From-SVN: r221953
2015-04-09 08:41:38 -07:00
Jonathan Wakely
4cbaaa459e
re PR libstdc++/65147 (alignment of std::atomic object is not correct)
...
2015-04-09 Jonathan Wakely <jwakely@redhat.com>
Richard Henderson <rth@redhat.com>
PR libstdc++/65147
* include/bits/atomic_base.h (__atomic_base<_ITp>): Increase
alignment.
* include/std/atomic (atomic): For types with a power of two size set
alignment to at least the size.
* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.
* testsuite/29_atomics/atomic/65147.cc: New.
* testsuite/29_atomics/atomic_integral/65147.cc: New.
Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r221945
2015-04-09 12:15:44 +01:00
Rainer Orth
9a165842d1
Update Solaris baselines
...
* config/abi/post/solaris2.10/baseline_symbols.txt: Regenerate.
* config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Likewise.
* config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Likewise.
From-SVN: r221941
2015-04-09 07:05:41 +00:00
Jakub Jelinek
466df27b94
baseline_symbols.txt: Update.
...
* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
From-SVN: r221933
2015-04-08 22:46:30 +02:00
Jonathan Wakely
744e26e71e
re PR libstdc++/65630 (operator+ for new std::string not exported)
...
PR libstdc++/65630
* config/abi/pre/gnu.ver: Export operator+ for new strings.
* testsuite/21_strings/basic_string/operators/char/65630.cc: New.
* testsuite/21_strings/basic_string/operators/wchar_t/65630.cc: New.
From-SVN: r221775
2015-03-30 18:52:37 +01:00
Tim Shen
2894311302
re PR libstdc++/65420 (Enumerators in std::regex_constants should be constexpr variables instead)
...
PR libstdc++/65420
* include/bits/regex_constants.h: Use constexpr variables for flags.
* testsuite/28_regex/constants/constexpr.cc: New testcase.
From-SVN: r221750
2015-03-28 04:17:12 +00:00
Jonathan Wakely
04f69fda7a
re PR libstdc++/65499 (Missing "using namespace literals::chrono_literals" in std::chrono)
...
PR libstdc++/65499
* include/std/chrono: Add using-directive for literals to std::chrono.
* testsuite/20_util/duration/literals/65499.cc: New.
From-SVN: r221730
2015-03-27 12:45:10 +00:00
Jonathan Wakely
d1a74a287e
re PR libstdc++/58038 (std::this_thread::sleep_until can cause inifinite sleep)
...
PR libstdc++/58038
PR libstdc++/60421
* include/std/thread (this_thread::sleep_for): Check for negative
durations.
(this_thread::sleep_until): Check for times in the past.
* testsuite/30_threads/this_thread/58038.cc: New.
* testsuite/30_threads/this_thread/60421.cc: New.
From-SVN: r221708
2015-03-26 19:59:08 +00:00
Jonathan Wakely
4280698d09
re PR libstdc++/62259 (atomic class doesn't enforce required alignment on powerpc64)
...
PR libstdc++/62259
PR libstdc++/65147
* include/std/atomic (atomic<T>): Increase alignment for types with
the same size as one of the integral types.
* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.
* testsuite/29_atomics/atomic/62259.cc: New.
From-SVN: r221703
2015-03-26 19:27:02 +00:00
Richard Henderson
8be568519b
re PR libstdc++/65033 (C++11 atomics: is_lock_free result does not always match the real lock-free property)
...
PR libstdc++/65033
* include/bits/atomic_base.h (__atomic_base<T>::is_lock_free): Build
a fake pointer indicating type alignment.
(__atomic_base<T *>::is_lock_free): Likewise.
* include/std/atomic (atomic<T>::is_lock_free): Likewise.
From-SVN: r221701
2015-03-26 11:31:11 -07:00
Alan Lawrence
28fda0c459
re PR libstdc++/33394 (Add test case for Thread race segfault in std::string::append with -O and -s)
...
PR libstdc++/33394
* testsuite/21_strings/basic_string/pthread33394.cc: Use
dg-additional-options.
From-SVN: r221666
2015-03-25 15:46:58 +00:00
Paolo Carlini
ea348bbe59
re PR libstdc++/65543 (rvalue stream insertion and extraction operators incorrectly implemented)
...
2015-03-25 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/65543
* include/std/istream (operator>>(basic_istream<>&&, _Tp&): Revert
thinko in r150387.
* include/std/ostream (operator<<(basic_ostream<>&&, const _Tp&):
Likewise.
* testsuite/27_io/rvalue_streams-2.cc: New.
From-SVN: r221655
2015-03-25 09:57:06 +00:00
Jonathan Wakely
9ccd0dba21
re PR libstdc++/33394 (Add test case for Thread race segfault in std::string::append with -O and -s)
...
PR libstdc++/33394
* testsuite/21_strings/basic_string/pthread33394.cc: Add test.
# Auto-generated commit message above this line, original below.
PR libstdc++/33394
* testsuite/21_strings/basic_string/pthread33394.cc: Add test.
From-SVN: r221635
2015-03-24 14:47:32 +00:00
Jonathan Wakely
8dcf3d3c5d
re PR libstdc++/64967 (Bootstrap fails due to errors in libstdc++ sources with `--enable-symvers=gnu-versioned-namespace')
...
PR libstdc++/64967
* acinclude.m4: Disable dual ABI when gnu-versioned-namespace in use.
* configure: Regenerate.
* src/c++11/compatibility-c++0x.cc (error_category), generic_category,
system_category): Use macros for versioned namespace.
* src/c++11/futex.cc: Add missing end macro for versioned namespace.
From-SVN: r221600
2015-03-23 16:47:18 +00:00
James Greenhalgh
c00acee464
[Patch Testsuite] Make all_attributes.cc in to (almost_)all_attributes.cc for ARM.
...
* testsuite/17_intro/headers/c++1998/all_attributes.cc: Disable
test for unused for ARM.
* testsuite/17_intro/headers/c++200x/all_attributes.cc: Likewise.
* testsuite/17_intro/headers/c++2014/all_attributes.cc: Likewise.
From-SVN: r221538
2015-03-20 17:20:12 +00:00
Jonathan Wakely
df6d9c7f6a
c++config (__gnu_cxx::__cxx11): Define new namespace.
...
* include/bits/c++config (__gnu_cxx::__cxx11): Define new namespace.
* include/ext/codecvt_specializations.h (encoding_state,
encoding_char_traits): Remove abi-tag and use inline namespace.
* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error line.
From-SVN: r221533
2015-03-20 13:26:55 +00:00
Jason Merrill
7cb7357360
re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types)
...
PR c++/65046
Automatically propagate ABI tags to variables and functions
from their (return) type.
* class.c (check_tag): Handle variables and functions.
(mark_or_check_attr_tags): Split out from find_abi_tags_r.
(mark_or_check_tags): Likewise.
(mark_abi_tags): Use it. Rename from mark_type_abi_tags.
(check_abi_tags): Add single argument overload for decls.
Handle inheriting tags for decls.
* mangle.c (write_mangled_name): Call it.
(mangle_return_type_p): Split out from write_encoding.
(unmangled_name_p): Split out from write_mangled_name.
(write_mangled_name): Ignore abi_tag on namespace.
* cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
* parser.c (cp_parser_namespace_definition): Set it.
* name-lookup.c (handle_namespace_attrs): Use arguments. Warn
about abi_tag attribute on non-inline namespace.
* tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
(handle_abi_tag_attribute): Allow tags on variables.
From-SVN: r221521
2015-03-19 15:31:48 -04:00
Jonathan Wakely
168ad5f5e3
re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types)
...
PR c++/65046
* config/locale/gnu/messages_members.cc (Catalog_info, Catalogs,
get_catalogs): Add abi-tag.
* include/ext/codecvt_specializations.h (encoding_state,
encoding_char_traits): Likewise.
* src/c++11/cxx11-ios_failure.cc (io_error_category): Likewise.
* src/c++11/cxx11-shim_facets.cc (__any_string::operator basic_string,
numpunct_shim, collate_shim, time_get_shim, moneypunct_shim,
money_get_shim, money_put_shim, messages_shim): Likewise.
* src/c++11/future.cc (future_error_category::message): Likewise.
* src/c++11/system_error.cc (generic_error_category::message,
system_error_category::message): Likewise.
(__sso_string): Disable -Wabi-tag warnings.
From-SVN: r221497
2015-03-18 18:08:29 +00:00
Jonathan Wakely
2a9611d03b
re PR libstdc++/13631 (Problems in messages)
...
PR libstdc++/13631
* config/locale/gnu/messages_members.cc (get_glibc_msg): Fix fallback
implementation for old glibc. Fix whitespace.
From-SVN: r221494
2015-03-18 16:17:47 +00:00
Jonathan Wakely
5e0216f173
acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Check for pthread_rwlock_t.
...
2015-03-18 Jonathan Wakely <jwakely@redhat.com>
Torvald Riegel <triegel@redhat.com>
* acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Check for pthread_rwlock_t.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/std/shared_mutex: Check _GLIBCXX_USE_PTHREAD_RWLOCK_T.
(shared_timed_mutex::_M_rwlock): Use PTHREAD_RWLOCK_INITIALIZER.
(shared_timed_mutex::lock_shared()): Retry on EAGAIN.
(shared_timed_mutex::try_lock_shared_until()): Retry on EAGAIN and
EDEADLK.
Co-Authored-By: Torvald Riegel <triegel@redhat.com>
From-SVN: r221484
2015-03-18 10:53:38 +00:00
Jonathan Wakely
1c6f4a147d
1.cc: Remove name of unused exception variable.
...
* testsuite/30_threads/shared_lock/modifiers/1.cc: Remove name of
unused exception variable.
* testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
* testsuite/30_threads/shared_lock/modifiers/2.cc: Remove duplicate
test.
* testsuite/30_threads/unique_lock/modifiers/2.cc: Likewise.
From-SVN: r221477
2015-03-17 16:36:32 +00:00
Jonathan Wakely
95f2fd9c5d
nested_exception.h: Do not try to derive from final classes.
...
* libsupc++/nested_exception.h: Do not try to derive from final
classes.
* testsuite/18_support/nested_exception/throw_with_nested.cc: Test
final class.
From-SVN: r221476
2015-03-17 14:24:55 +00:00
Jonathan Wakely
e83a01c383
* include/experimental/system_error: Fix include guard.
...
From-SVN: r221417
2015-03-13 12:47:21 +00:00
Jonathan Wakely
9b78b1e730
acinclude.m4: Make --enable-libstdcxx-time=auto work for dragonfly.
...
* acinclude.m4: Make --enable-libstdcxx-time=auto work for dragonfly.
* configure: Regenerate.
From-SVN: r221414
2015-03-13 10:49:08 +00:00
Renlin Li
04a1709359
[PATCH]Remove xfail for wrapped target
...
libstdc++-v3/
2015-03-12 Renlin Li <renlin.li@arm.com>
* testsuite/27_io/ios_base/sync_with_stdio/1.cc: Remove xfail for
wrapped target.
From-SVN: r221393
2015-03-12 15:00:28 +00:00
Tim Shen
84839a5140
re PR libstdc++/64441 (A match_results returns an incorrect sub_match if the sub_match::matched is false)
...
PR libstdc++/64441
* include/bits/regex.h (match_results<>::size,
match_results<>::position, match_results<>::str,
match_results<>::operator[], match_results<>::prefix,
match_results<>::suffix, match_results<>::end,
match_results<>::_M_resize, match_results<>::_M_unmatched_sub,
match_results<>::_M_prefix, match_results<>::_M_suffix): Remove
global __unmatched_sub. Add unmatched submatch as part of
match_results.
* include/bits/regex.tcc (__regex_algo_impl<>, regex_replace<>,
regex_iterator<>::operator++): Adjust to use match_results::_M_prefix.
* testsuite/28_regex/match_results/out_of_range_submatches.cc:
New testcases.
From-SVN: r221330
2015-03-10 18:41:46 +00:00
Jonathan Wakely
d2e0c00b8c
re PR libstdc++/64467 (28_regex/traits/char/isctype.cc and wchar_t/isctype.cc)
...
PR libstdc++/64467
* testsuite/28_regex/traits/char/isctype.cc: Don't test newline
for newlib targets. Really fix mixed line-endings this time.
From-SVN: r221279
2015-03-09 12:47:51 +00:00
Jonathan Wakely
664e99eac4
future (future_error(error_code)): Construct base class with error_code's message.
...
* include/std/future (future_error(error_code)): Construct base
class with error_code's message.
* src/c++11/future.cc (future_error::what()): Do not call c_str() on
temporary string.
From-SVN: r221236
2015-03-06 12:31:43 +00:00
Jonathan Wakely
9933260f2f
locale_conv.h (wstring_convert::_M_conv): Handle noconv result.
...
* include/bits/locale_conv.h (wstring_convert::_M_conv): Handle
noconv result.
* testsuite/22_locale/conversions/string/2.cc: Also test UTF-8.
* testsuite/22_locale/conversions/string/3.cc: Likewise, and UTF-16.
From-SVN: r221212
2015-03-05 13:36:21 +00:00
Jonathan Wakely
b6584a72ac
re PR libstdc++/64797 (22_locale/conversions/string/2.cc FAILs)
...
PR libstdc++/64797
* include/bits/locale_conv.h (wstring_convert::_M_conv): Handle
incomplete multibyte sequences correctly.
* include/std/codecvt (codecvt_utf8, codecvt_utf16,
codecvt_utf8_utf16): Limit _Maxcode to maximum Unicode code point.
* src/c++11/codecvt.cc (invalid_mb_sequence, incomplete_mb_character):
Define constants.
(is_high_surrogate, is_low_surrogate, surrogate_pair_to_code_point):
Define convenience functions.
(read_utf8_code_point): Return relevant constant to distinguish
incomplete characters from invalid sequences.
(read_utf16_code_point): Likewise. Check for invalid sequences.
(ucs4_in, utf16_in): Use incomplete_mb_character constant.
(utf16_out): Check for invalid sequences.
(utf16_span): Fix condition.
(ucs2_out): Use is_high_surrogate.
(ucs2_in): Use incomplete_mb_character constant and fix condition.
* testsuite/22_locale/codecvt/char16_t.cc: Fix whitespace.
* testsuite/22_locale/conversions/buffer/1.cc: New.
* testsuite/22_locale/conversions/string/2.cc: Use char16_t and
char32_t instead of wchar_t.
* testsuite/22_locale/conversions/string/3.cc: New.
From-SVN: r221189
2015-03-04 17:19:55 +00:00
Iain Sandoe
71ca36ba7b
re PR libstdc++/64883 (FAIL: 17_intro/headers/c++*/all_attributes.cc (test for excess errors) on x86_64-apple-darwin10)
...
2015-03-03 Iain Sandoe <iain@codesourcery.com>
PR libstdc++/64883
* testsuite/17_intro/headers/c++1998/all_attributes.cc: Don't check
visibility for Darwin.
* testsuite/17_intro/headers/c++200x/all_attributes.cc: Likewise, and
also deprecated.
* testsuite/17_intro/headers/c++2014/all_attributes.cc: Likewise.
From-SVN: r221160
2015-03-03 18:14:20 +00:00
Jonathan Wakely
9d8dbe732a
re PR libstdc++/65279 (std::scoped_allocator_adaptor is not assignable)
...
PR libstdc++/65279
* include/std/scoped_allocator (__inner_type_impl,
scoped_allocator_adaptor): Add defaulted copy assignment and move
assignment operators.
* testsuite/20_util/scoped_allocator/65279.cc: New.
From-SVN: r221119
2015-03-02 17:50:55 +00:00
Jonathan Wakely
e59a2e945e
re PR libstdc++/64367 (g++-v5/stdexcept:52:28: error: invalid use of non-static data member '_M_p')
...
PR libstdc++/64367
* include/std/stdexcept (__sso_string): Don't use non-static member
in sizeof.
From-SVN: r221118
2015-03-02 16:50:24 +00:00
Matthias Klose
f083b434c2
re PR libstdc++/65246 (libstdc++ pretty printers don't work anymore with Python3)
...
2015-02-28 Matthias Klose <doko@ubuntu.com>
PR libstdc++/65246
* python/libstdcxx/v6/__init__.py: Use explicit relative imports.
From-SVN: r221076
2015-02-28 09:22:43 +00:00
Jonathan Wakely
1d5f1ff217
status_cxx2011.xml: Remove duplicated information.
...
* doc/xml/manual/status_cxx2011.xml: Remove duplicated information.
* doc/html/manual/status.html: Regenerate.
From-SVN: r220894
2015-02-22 13:20:32 +00:00
Jonathan Wakely
b56ac9d5f4
status_cxx2011.xml: Document implementation-defined behavior.
...
* doc/xml/manual/status_cxx2011.xml: Document implementation-defined
behavior.
* doc/html/manual/status.html: Regenerate.
From-SVN: r220878
2015-02-20 19:01:46 +00:00
Jonathan Wakely
deaa1ccbec
re PR libstdc++/64695 (FAIL: libstdc++-prettyprinters/cxx11.cc)
...
PR libstdc++/64695
* python/libstdcxx/v6/printers.py (StdTuplePrinter): Handle new
tuple layout.
From-SVN: r220871
2015-02-20 14:40:00 +00:00
Jonathan Wakely
87839f22d2
re PR libstdc++/58357 (In C++11 std::rotate(first, middle, last) now should return a forward iterator to first + (last - middle).)
...
PR libstdc++/58357
* include/bits/algorithmfwd.h (rotate): Move to inline namespace _V2.
* include/bits/stl_algo.h (__rotate, rotate): Likewise.
From-SVN: r220823
2015-02-19 20:57:40 +00:00
Hans-Peter Nilsson
53b2288f93
re PR testsuite/65093 (26_numerics/random/binomial_distribution/operators/values.cc times out on slow targets)
...
PR testsuite/65093
* testsuite/26_numerics/random/binomial_distribution/operators/values.cc
(test01): Add explanatory comment. Keep only the bd1 sub-test and
split out bd2, bd3, bd4, and bd5 sub-tests into...
* testsuite/26_numerics/random/binomial_distribution/operators/values2.cc,
testsuite/26_numerics/random/binomial_distribution/operators/values3.cc,
testsuite/26_numerics/random/binomial_distribution/operators/values4.cc,
testsuite/26_numerics/random/binomial_distribution/operators/values5.cc:
New separate files with the old parts.
From-SVN: r220821
2015-02-19 19:30:03 +00:00
Jonathan Wakely
01bf6bdb10
char16_t.cc: Add dg-require-cstdint.
...
* testsuite/22_locale/codecvt/char16_t.cc: Add dg-require-cstdint.
* testsuite/22_locale/codecvt/char32_t.cc: Likewise.
From-SVN: r220795
2015-02-18 20:21:04 +00:00
Jonathan Wakely
7f971f18e4
codecvt.cc (write_utf16_code_point): Fix code to output surrogate pairs.
...
* src/c++11/codecvt.cc (write_utf16_code_point): Fix code to output
surrogate pairs.
(utf16_in): Pass mode argument to write_utf16_code_point.
(codecvt<char16_t, char, mbstate_t>::do_in): Set mode according to
native byte order.
* testsuite/22_locale/codecvt/char16_t.cc: New.
* testsuite/22_locale/codecvt/in/wchar_t/1.cc: Fix typo.
From-SVN: r220793
2015-02-18 19:39:03 +00:00
Rüdiger Sonderfeld
fb96818737
char32_t.cc: New.
...
2015-02-17 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
Jonathan Wakely <jwakely@redhat.com>
* testsuite/22_locale/codecvt/char32_t.cc: New.
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r220760
2015-02-17 14:25:48 +00:00
Jonathan Wakely
faa7d78e41
re PR libstdc++/65085 (Move-assigned empty string corrupt with -D_GLIBCXX_USE_CXX11_ABI=1)
...
PR libstdc++/65085
* include/bits/basic_string.h (basic_string(basic_string&&)): Ensure
empty string gets null-terminated.
* testsuite/21_strings/basic_string/cons/char/65085.cc: New.
From-SVN: r220758
2015-02-17 12:44:26 +00:00
Matthew Wahab
1e0c223f94
isctype.cc (test01): Fix mixed line-endings introduced in last change.
...
* testsuite/28_regex/traits/char/isctype.cc (test01): Fix
mixed line-endings introduced in last change.
From-SVN: r220682
2015-02-13 13:42:06 +00:00
Jason Merrill
864f0146f0
* testsuite/28_regex/traits/wchar_t/isctype.cc: Fix whitespace.
...
From-SVN: r220655
2015-02-12 15:20:30 -05:00
Matthew Wahab
72900b8306
isctype.cc (test01): Replace test for __NEWLIB__ macro with a dejagnu set macro.
...
* testsuite/28_regex/traits/char/isctype.cc (test01): Replace test
for __NEWLIB__ macro with a dejagnu set macro.
* testsuite/28_regex/traits/wchar_t/isctype.cc (test01): Likewise.
From-SVN: r220648
2015-02-12 14:55:23 +00:00
Matthew Wahab
ff9eac2965
[PATCH][libstdc++][Testsuite] isctype test fails for newlib.
...
libstdc++-v3/
2015-02-02 Matthew Wahab <matthew.wahab@arm.com>
PR libstdc++/64467
* testsuite/28_regex/testsuiteraits/char/isctype.cc (test01): Add newlib
special case for '\n'.
* test01estsuite/28_regex/traits/wchar_t/isctype.cc (test01): Likewise.
From-SVN: r220392
2015-02-04 09:24:56 +00:00
Jonathan Wakely
516db2dd07
* src/c++11/futex.cc: Do not define for gthr-single.h targets.
...
From-SVN: r220319
2015-02-01 15:11:23 +00:00
Jonathan Wakely
13fc08e44e
re PR libstdc++/64883 (FAIL: 17_intro/headers/c++*/all_attributes.cc (test for excess errors) on x86_64-apple-darwin10)
...
PR libstdc++/64883
* include/c_global/cstdio (gets): Use __deprecated__ attribute instead
of deprecated.
* include/c_std/cstdio (gets): Likewise.
* testsuite/17_intro/headers/c++1998/all_attributes.cc: Avoid clashing
with attributes used in darwin headers.
From-SVN: r220318
2015-02-01 15:11:08 +00:00
Jakub Jelinek
536616b775
acinclude.m4 (VTV_CYGMIN): Use x$vtv_cygmin = xyes instead of $vtv_cygmin = yes.
...
* acinclude.m4 (VTV_CYGMIN): Use x$vtv_cygmin = xyes instead of
$vtv_cygmin = yes. Initialize vtv_cygmin=no unconditionally first.
* configure: Regenerated.
From-SVN: r220259
2015-01-29 19:36:03 +01:00
H.J. Lu
f4392940cd
Define VTV_CYGMIN after vtv_cygmin is set
...
* acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY): Define VTV_CYGMIN
after vtv_cygmin is set.
* configure: Regenerated.
From-SVN: r220258
2015-01-29 10:21:33 -08:00
Matthias Klose
23842e9135
acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY): Define VTV_CYGMIN unconditionally.
...
2015-01-29 Matthias Klose <doko@ubuntu.com>
* acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY): Define VTV_CYGMIN
unconditionally.
* configure: Regenerate.
From-SVN: r220257
2015-01-29 18:12:29 +00:00
Caroline Tice
8be349eea9
Committing generated configure & Makefile.in pieces of VTV Cygwin patch (from Patrick Wollgast).
...
Committing generated configure & Makefile.in pieces of
VTV Cygwin patch (from Patrick Wollgast). Forgot to
commit these with the rest of the patch.
From-SVN: r220254
2015-01-29 08:47:25 -08:00
Jonathan Wakely
85d44192f6
atomic_base.h: Use __always_inline__ instead of always_inline.
...
* include/bits/atomic_base.h: Use __always_inline__ instead of
always_inline.
* include/bits/atomic_futex.h: Likewise.
* include/bits/c++config: Use __abi_tag__ instead of abi_tag.
* include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Use
__packed__ instead of packed.
* include/std/shared_mutex: Use __unused__ instead of unused.
* testsuite/17_intro/headers/c++1998/all_attributes.cc: New.
* testsuite/17_intro/headers/c++200x/all_attributes.cc: New.
* testsuite/17_intro/headers/c++2014/all_attributes.cc: New.
From-SVN: r220243
2015-01-29 12:47:20 +00:00
Caroline Tice
f7f049fa46
Committing VTV Cygwin patch for Patrick Wollgast
...
* gcc/config/i386/cygwin.h (STARTFILE_SPEC): Add vtv_start.o,
if -fvtable-verify=preinit/std is used.
* gcc/config/i386/mingw-w64.h (STARTFILE_SPEC): Likewise.
* gcc/config/i386/mingw32.h (STARTFILE_SPEC): Likewise.
* gcc/config/i386/cygwin.h (ENDFILE_SPEC): Add vtv_end.o,
if -fvtable-verify=preinit/std is used.
* gcc/config/i386/mingw32.h (ENDFILE_SPEC): Likewise.
* gcc/config/i386/cygwin.h (LIB_SPEC): Pass -lvtv and -lpsapi,
if -fvtable-verify=preinit/std is used.
* gcc/config/i386/mingw-w64.h (LIB_SPEC): Likewise.
* gcc/config/i386/mingw32.h (LIB_SPEC): Likewise.
* gcc/cp/vtable-class-hierarchy.c (vtv_generate_init_routine): Add
check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
* gcc/varasm.c (assemble_variable): Add code to properly set the comdat
section and name for the .vtable_map_vars section in case the
target is PE or COFF.
* libgcc/Makefile.in: Move rules to build vtv_*.o out of the check
for CUSTOM_CRTSTUFF.
* libgcc/config.host (i[34567]86-*-cygwin*, x86_64-*-cygwin*, i[34567]86-*-mingw*)
(x86_64-*-mingw*): Only add vtv_*.o to extra_parts if enable_vtable_verify.
* libstdc++-v3/acinclude.m4: Define VTV_CYGMIN.
* libstdc++-v3/configure: Regenerate.
* libstdc++-v3/libsupc++/Makefile.am: Add vtv_sources only to
libsupc___la_SOURCES and libsupc__convenience_la_SOURCES if VTV_CYGMIN is
not set.
* libstdc++-v3/libsupc++/Makefile.in: Regenerated.
* libstdc++-v3/libsupc++/vtv_stubs.cc: Add none weak declaration of every
function for Cygwin and MinGW.
* libstdc++-v3/src/Makefile.am: Add libvtv.la to toolexeclib_LTLIBRARIES,
if VTV_CYGMIN is set. Define libvtv_la_SOURCES, libvtv_la_LDFLAGS,
libvtv_la_AM_CXXFLAGS and libvtv_la_LINK if VTV_CYGMIN is set.
* libstdc++-v3/src/Makefile.in: Regenerate.
* libvtv/Makefile.am : Add libvtv.la to toolexeclib_LTLIBRARIES, if VTV_CYGMIN
is set. Define libvtv_la_LIBADD, libvtv_la_LDFLAGS, libvtv_stubs_la_LDFLAGS
and libvtv_stubs_la_SOURCES if VTV_CYGMIN is set. Add obstac.c to
libvtv_la_SOURCES if VTV_CYGMIN is set.
* libvtv/Makefile.in : Regenerate.
* libvtv/aclocal.m4 : Regenerate.
* libvtv/configure : Regenerate.
* libvtv/configure.ac : Add ACX_LT_HOST_FLAGS. Define VTV_CYGMIN.
* libvtv/configure.tgt : (x86_64-*-cygwin*, i?86-*-cygwin*, x86_64-*-mingw*)
(i?86-*-mingw*): Add to supported targets.
* libvtv/vtv_fail.cc : Skip inclusion of execinfo.h on Cygwin and MinGW.
(log_error_message): Skip calls to backtrace and backtrace_symbols_fd on Cygwin
and MinGW.
* libvtv/vtv_malloc.cc : Include windows.h and skip sys/mman.h inclusion on
Cygwin and MinGW. Add sysconf port on Cygwin and MinGW.
(obstack_chunk_alloc): Exchange call to mmap with call to VirtualAlloc on Cygwin
and MinGW.
(__vtv_malloc_init): Exchange call to sysconf with call to port of sysconf on
Cygwin and MinGW.
* libvtv/vtv_malloc.h : Declare mprotect and define PROT_READ and PROT_WRITE on
Cygwin and MinGW.
* libvtv/map.h : Include stdint.h on MinGW.
* libvtv/rts.cc : Include windows.h, winternl.h and psapi.h, skip include of
execinfo.h, sys/mman.h and link.h on Cygwin and MinGW.
Add port of __fortify_fail on Cygwin and MinGW.
Change ElfW (Addr) to uintptr_t on Cygwin and MinGW.
(read_section_offset_and_length): Add port for Cygwin and MinGW
(iterate_modules): New function.
(vtv_unprotect_vtable_vars): Use iterate_modules instead of dl_iterate_phdr on
Cygwin and MinGW.
(vtv_protect_vtable_vars): Likewise.
(count_all_pages): Likewise.
(dl_iterate_phdr_count_pages): Don't build on Cygwin and MinGW.
* libvtv/utils.cc : Include windows.h and skip execinfo.h inclusion on
Cygwin and MinGW.
(__vtv_open_log): Exchange call to getuid and getpid with GetCurrentProcessId and
adjust call to snprintf accordingly on Cygwin and MinGW.
Adjust calls to mkdir on MinGW.
Adjust call to open on Cygwin and MinGW.
(__vtv_add_to_log): Adjust call to snprintf on Cygwin and MinGW.
(__vtv_log_verification_failure): Don't generate a backtrace on Cygwin and MinGW.
From-SVN: r220232
2015-01-29 00:03:56 -08:00
Jonathan Wakely
739cdc9041
re PR libstdc++/64828 (libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat])
...
PR libstdc++/64828
* libsupc++/Makefile.am: Compile del_opvs.cc as C++14.
* libsupc++/Makefile.in: Regenerate.
* src/c++11/Makefile.in: Regenerate.
From-SVN: r220207
2015-01-28 15:02:28 +00:00
Kyrylo Tkachov
f6d04238e0
[libstdc++][testsuite][reverted] Remove check for truncation overflow
...
* testsuite/lib/libstdc++.exp (v3_target_compile): Remove
check for unsupported.
(v3_target_compile_as_c): Likewise.
From-SVN: r220206
2015-01-28 13:53:45 +00:00
Richard Biener
8aa33fadbe
re PR libstdc++/64798 (g++.old-deja/g++.eh/badalloc1.C FAILs)
...
2015-01-28 Richard Biener <rguenther@suse.de>
PR libstdc++/64798
* libsupc++/eh_alloc.cc (struct allocated_entry): Align
data member.
(pool::allocate): Adjust allocation size and alignment to
that change.
(pool::free): Adjust pointer offsetting.
From-SVN: r220201
2015-01-28 09:53:39 +00:00
Jonathan Wakely
506f03c370
re PR target/64368 (Several libstdc++ test failures on non-linux platforms after r218964.)
...
PR libstdc++/64368
* include/std/shared_mutex (shared_timed_mutex::try_lock_for,
shared_timed_mutex::try_lock_until): Only define when POSIX thread
timeouts option is supported.
(shared_timed_mutex::try_shared_lock_for,
shared_timed_mutex::try_shared_lock_until): Likewise.
From-SVN: r220161
2015-01-27 11:12:04 +00:00
Jonathan Wakely
831a3a9e34
re PR target/64368 (Several libstdc++ test failures on non-linux platforms after r218964.)
...
PR libstdc++/64368
* config/locale/gnu/numeric_members.cc (numpunct<char>::~numpunct(),
numpunct<wchar_t>::~numpunct()): Do not set _M_data->_M_grouping.
* src/c++11/cxx11-shim_facets.cc (numpunct_shim): Remove _M_grouping
and use cache's _M_grouping field.
(__numpunct_fill_cache): Likewise.
(__moneypunct_fill_cache): Improve comments.
From-SVN: r220143
2015-01-26 23:42:39 +00:00
Jonathan Wakely
c7ac7ddaa9
2.cc: Add test for non-transparent comparison function.
...
* testsuite/23_containers/set/operations/2.cc: Add test for
non-transparent comparison function.
From-SVN: r220107
2015-01-26 11:18:14 +00:00
Oleg Endo
5eb1643c2c
re PR libstdc++/29366 (atomics config for sh is weird)
...
libstdc++-v3/
PR target/29366
* config/cpu/sh/atomicity.h (__exchange_and_add, __atomic_add):
Remove SH4A inline asm and lock based implementations and use the
defaults from ext/atomicity.h.
From-SVN: r220094
2015-01-25 16:54:33 +00:00
Jonathan Wakely
130dc027c5
gnu.ver: Tighten GLIBCXX_3.4 patterns to not match new std::string constructors for...
...
* config/abi/pre/gnu.ver: Tighten GLIBCXX_3.4 patterns to not match
new std::string constructors for byname facets.
From-SVN: r220043
2015-01-23 15:23:20 +00:00
Richard Biener
cce93c76ba
re PR libstdc++/64535 (Emergency buffer for exception allocation too small)
...
2015-01-22 Richard Biener <rguenther@suse.de>
PR libstdc++/64535
* libsupc++/eh_alloc.cc: Include new.
(bitmask_type): Remove.
(one_buffer): Likewise.
(emergency_buffer): Likewise.
(emergency_used): Likewise.
(dependents_buffer): Likewise.
(dependents_used): Likewise.
(class pool): New custom fixed-size arena, variable size object
allocator.
(emergency_pool): New global.
(__cxxabiv1::__cxa_allocate_exception): Use new emergency_pool.
(__cxxabiv1::__cxa_free_exception): Likewise.
(__cxxabiv1::__cxa_allocate_dependent_exception): Likewise.
(__cxxabiv1::__cxa_free_dependent_exception): Likewise.
* g++.old-deja/g++.eh/badalloc1.C: Adjust.
From-SVN: r219988
2015-01-22 09:21:48 +00:00
Tim Shen
770acfc9e3
re PR libstdc++/64680 (basic_regex::operator= does not reset flags)
...
PR libstdc++/64680
* include/bits/regex.h (basic_regex<>::basic_regex,
basic_regex<>::operator=, basic_regex<>::imbue): Conform to the
standard interface.
* testsuite/28_regex/basic_regex/assign/char/cstring.cc: New testcase.
From-SVN: r219987
2015-01-22 05:07:03 +00:00
Tim Shen
77033d2668
re PR libstdc++/64649 (regex_traits::lookup_classname() only works with random access iterators)
...
PR libstdc++/64649
* include/bits/regex.tcc (regex_traits<>::lookup_collatename,
regex_traits<>::lookup_classname): Correctly narrow input chars.
* testsuite/28_regex/traits/wchar_t/user_defined.cc: New testcase.
From-SVN: r219986
2015-01-22 05:02:38 +00:00
Jonathan Wakely
f81f49c180
* config/abi/pre/gnu.ver: Use [jmy] for size_t parameters.
...
From-SVN: r219953
2015-01-21 16:17:31 +00:00
Jonathan Wakely
deff1f4105
* testsuite/29_atomics/atomic/64658.cc: Test stored value.
...
From-SVN: r219952
2015-01-21 16:17:17 +00:00
Jonathan Wakely
7d56e747e2
status_cxx2011.xml: Remove stray dbhtml tags.
...
* doc/xml/manual/status_cxx2011.xml: Remove stray dbhtml tags.
* doc/xml/manual/status_cxx2014.xml: Update status.
* doc/html/manual/status.html: Regenerate.
From-SVN: r219891
2015-01-20 12:31:22 +00:00
Jonathan Wakely
4159cf0d22
re PR libstdc++/64650 (std::experimental::bad_optional_access is not default constructible)
...
PR libstdc++/64650
* include/experimental/optional (bad_optional_access): Add default
constructor.
* testsuite/experimental/optional/requirements.cc: Test for default
constructor.
From-SVN: r219889
2015-01-20 11:51:03 +00:00
Jonathan Wakely
91c78ea5b6
Implement N3657: heterogeneous lookup in associative containers.
...
* include/bits/stl_map.h (map::find<>, map::count<>,
map::lower_bound<>, map::upper_bound<>, map::equal_range<>): New
member function templates to perform heterogeneous lookup.
* include/bits/stl_multimap.h (multimap::find<>, multimap::count<>,
multimap::lower_bound<>, multimap::upper_bound<>,
multimap::equal_range<>): Likewise.
* include/bits/stl_multiset.h (multiset::find<>, multiset::count<>,
multiset::lower_bound<>, multiset::upper_bound<>,
multiset::equal_range<>): Likewise.
* include/bits/stl_set.h (set::find<>, set::count<>,
set::lower_bound<>, set::upper_bound<>, set::equal_range<>): Likewise.
* include/bits/stl_tree.h (_Rb_tree::_S_lower_bound_tr,
_Rb_tree::_S_upper_bound_tr, _Rb_tree::_M_find_tr,
_Rb_tree::_M_count_tr, _Rb_tree::_M_lower_bound_tr,
_Rb_tree::_M_upper_bound_tr, _Rb_tree::_M_equal_range_tr): Likewise.
* testsuite/23_containers/map/operations/2.cc: New.
* testsuite/23_containers/multimap/operations/2.cc: New.
* testsuite/23_containers/multiset/operations/2.cc: New.
* testsuite/23_containers/set/operations/2.cc: New.
From-SVN: r219888
2015-01-20 11:50:58 +00:00
Jonathan Wakely
71a16cd8bc
Add C++11 std::string constructors for locales and facets.
...
* config/abi/pre/gnu.ver: Export new constructors.
* include/bits/codecvt.h (codecvt_byname): Add string constructor.
(codecvt_byname<char16_t>, codecvt_byname<char32_t>): Define explicit
specializations and declare explicit instantiations.
* include/bits/locale_classes.h (locale, collate_byname): Add string
constructors.
* include/bits/locale_facets.h (ctype_byname, numpunct_byname):
Likewise.
* include/bits/locale_facets_nonio.h (time_get_byname,
time_put_byname, moneypunct_byname, messages_byname): Likewise.
* src/c++11/codecvt.cc (codecvt_byname<char16_t>,
codecvt_byname<char32_t>): Define explicit instantiations.
* src/c++11/locale-inst.cc (time_put_byname, codecvt_byname):
Instantiate string constructors.
(ctype_byname): Define string constructor.
* testsuite/22_locale/codecvt_byname/1.cc: New.
* testsuite/22_locale/collate_byname/1.cc: New.
* testsuite/22_locale/ctype_byname/2.cc: New.
* testsuite/22_locale/messages_byname/1.cc: New.
* testsuite/22_locale/moneypunct_byname/1.cc: New.
* testsuite/22_locale/numpunct_byname/1.cc: New.
From-SVN: r219887
2015-01-20 11:50:51 +00:00
Jonathan Wakely
0e4974d62e
re PR libstdc++/64658 (std::atomic_init() undefined)
...
PR libstdc++/64658
* include/std/atomic (atomic_init): Define.
* testsuite/29_atomics/atomic/64658.cc: New.
From-SVN: r219886
2015-01-20 11:50:43 +00:00
Tim Shen
e5f3553320
re PR libstdc++/64649 (regex_traits::lookup_classname() only works with random access iterators)
...
PR libstdc++/64649
* include/bits/regex.tcc (regex_traits<>::lookup_collatename,
regex_traits<>::lookup_classname): Support forward iterators.
* testsuite/28_regex/traits/char/lookup_classname.cc: New testcases.
* testsuite/28_regex/traits/char/lookup_collatename.cc: New testcase.
From-SVN: r219866
2015-01-19 23:00:13 +00:00
Tim Shen
60c176fb45
re PR libstdc++/64584 (basic_regex::assign breaks *this if it throws regex_error)
...
PR libstdc++/64584
PR libstdc++/64585
* include/bits/regex.h (basic_regex<>::basic_regex,
basic_regex<>::assign, basic_regex<>::imbue,
basic_regex<>::swap, basic_regex<>::mark_count): Drop NFA after
imbuing basic_regex; Make assign() transactional against exception.
* include/bits/regex_compiler.h (__compile_nfa<>): Add back
__compile_nfa SFINAE.
* include/std/regex: Adjust include order to avoid __compile_nfa
forward declaration.
* testsuite/28_regex/basic_regex/assign/char/string.cc: New testcase.
* testsuite/28_regex/basic_regex/imbue/string.cc: New testcase.
From-SVN: r219865
2015-01-19 22:56:04 +00:00
Ville Voutilainen
8bae22b708
range_access.h (begin, end): Use _GLIBCXX14_CONSTEXPR on overloads for arrays.
...
2015-01-19 Ville Voutilainen <ville.voutilainen@gmail.com>
Jonathan Wakely <jwakely@redhat.com>
* include/bits/range_access.h (begin, end): Use _GLIBCXX14_CONSTEXPR
on overloads for arrays.
(cbegin, cend, rbegin, rend, crbegin, crend): New.
* testsuite/24_iterators/range_access_cpp14.cc: New.
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r219846
2015-01-19 14:37:03 +00:00
Jonathan Wakely
257024e31e
re PR libstdc++/64646 (New overloads of std::is_permutation dereference past-the-end iterator)
...
PR libstdc++/64646
* include/bits/stl_algo.h (__is_permutation): Also test for reaching
end of the second range.
* testsuite/25_algorithms/is_permutation/64646.cc: New.
From-SVN: r219821
2015-01-18 16:31:06 +00:00
Jonathan Wakely
fded3d73da
status_cxx2011.xml: Remove note about offsetof.
...
* doc/xml/manual/status_cxx2011.xml: Remove note about offsetof.
* doc/html/manual/status.html: Regenerate.
From-SVN: r219817
2015-01-18 15:47:18 +00:00
Jonathan Wakely
1e3919acb1
* src/c++11/futex.cc: Fix order of includes and preprocessor condition.
...
From-SVN: r219816
2015-01-18 14:38:53 +00:00
Jonathan Wakely
87361f3098
atomic_futex.h: Use mutex and condition_variable when atomic int is not lock-free.
...
* include/bits/atomic_futex.h: Use mutex and condition_variable when
atomic int is not lock-free. Make member variables private.
* src/c++11/futex.cc: Likewise.
From-SVN: r219815
2015-01-18 14:25:22 +00:00
Jonathan Wakely
c6c1bfd99b
re PR libstdc++/64638 (Build failure with recent futex changes in libstdc++, likely all non-gthreads targets)
...
PR libstdc++/64638
* include/bits/atomic_futex.h: Use appropriate config macros for
availability of std::mutex, std::condition and std::chrono.
From-SVN: r219799
2015-01-17 13:48:48 +00:00
Ville Voutilainen
21c4af433b
status_cxx2011.xml: Update C++11 status.
...
2015-01-17 Ville Voutilainen <ville.voutilainen@gmail.com>
Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/status_cxx2011.xml: Update C++11 status.
* doc/html/*: Regenerate.
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r219794
2015-01-17 03:23:52 +00:00
Jonathan Wakely
1d0a12dc55
DR 488 PR libstdc++/58357
...
DR 488
PR libstdc++/58357
* include/bits/algorithmfwd.h (rotate): Return an iterator.
* include/bits/stl_algo.h (rotate, __rotate): Likewise.
* testsuite/25_algorithms/rotate/dr488.cc: New.
* testsuite/25_algorithms/rotate/check_type.cc: Adjust function type.
* testsuite/25_algorithms/rotate/requirements/explicit_instantiation/
2.cc: Likewise.
* testsuite/25_algorithms/rotate/requirements/explicit_instantiation/
pod.cc: Likewise.
From-SVN: r219793
2015-01-17 03:15:52 +00:00
Jonathan Wakely
d31b87976f
re PR libstdc++/60940 (general operations on atomic types do not work with atomic integral typedefs)
...
PR libstdc++/60940
* include/bits/atomic_base.h: Remove atomic integral typedefs as
synonyms for __atomic_base<int> etc.
* include/std/atomic: Make atomic_int a synonym for atomic<int> and
likewise for all atomic integral types.
* testsuite/29_atomics/atomic_integral/cons/copy_list.cc: New.
* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.
From-SVN: r219790
2015-01-17 01:23:28 +00:00
Jonathan Wakely
3ecec1eff7
re PR libstdc++/56785 (std::tuple of two elements does not apply empty base class optimization when one of its elements is a std::tuple with two elements)
...
PR libstdc++/56785
* include/std/tuple (_Tuple_impl): Remove zero-element specialization
and define one-element specialization.
* testsuite/20_util/tuple/56785.cc: New.
From-SVN: r219785
2015-01-17 00:21:41 +00:00
Jonathan Wakely
c23ccace5c
1.cc: Remove unused header.
...
* testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc:
Remove unused header.
* testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc:
Likewise.
* testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
Likewise.
From-SVN: r219781
2015-01-17 00:12:50 +00:00
Jonathan Wakely
96d8c147aa
locale_conv.h (wstring_convert, [...]): New.
...
* include/bits/locale_conv.h (wstring_convert, wbuffer_convert): New.
* include/std/locale: Include new header.
* include/Makefile.am: Add it.
* include/Makefile.in: Regenerate.
* testsuite/22_locale/conversions/buffer/requirements/typedefs.cc: New.
* testsuite/22_locale/conversions/string/1.cc: New.
* testsuite/22_locale/conversions/string/2.cc: New.
* testsuite/22_locale/conversions/string/requirements/typedefs.cc: New.
* testsuite/22_locale/conversions/string/requirements/typedefs-2.cc:
New.
From-SVN: r219780
2015-01-16 23:38:48 +00:00
Jonathan Wakely
28af1fb39d
Implement C++11 <codecvt> header.
...
* config/abi/pre/gnu.ver: Export new symbols.
* include/Makefile.am: Add codecvt.
* include/Makefile.in: Regenerate.
* include/std/codecvt: New header.
* src/c++11/codecvt.cc (__codecvt_utf8_base, __codecvt_utf16_base,
__codecvt_utf8_utf16_base): Define specializations.
* testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc: New.
* testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc: New.
* testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
New.
From-SVN: r219779
2015-01-16 23:38:35 +00:00
Torvald Riegel
eae801bacc
libstdc++: Optimize synchronization in std::future if futexes are available.
...
* src/c++11/futex.cc: New file.
* include/bits/atomic_futex.h: New file.
* include/std/future (__future_base::_State_baseV2): Use
atomic_futex_unsigned instead of mutex+condvar.
* src/c++11/futex.cc: Likewise.
* include/Makefile.am: Add atomic_futex.h.
* include/Makefile.in: Likewise.
* src/c++11/Makefile.am: Add futex.cc.
* src/c++11/Makefile.in: Likewise.
From-SVN: r219770
2015-01-16 19:50:43 +00:00
Jonathan Wakely
bb93f35da1
acinclude.m4: Fix typo in comment.
...
* acinclude.m4: Fix typo in comment.
* configure: Regenerate.
* include/bits/codecvt.h (codecvt<char16_t, char, mbstate_t>,
codecvt<char16_t, char, mbstate_t>): Declare specializations.
* include/bits/locale_facets.h: Reserve space for new specializations.
* src/c++11/Makefile.am: Add codecvt.cc.
* src/c++11/Makefile.in: Regenerate.
* src/c++11/codecvt.cc: New.
* src/c++98/Makefile.am: Compile locale_init.cc and localename.cc
with -std=gnu++11.
* src/c++98/Makefile.in: Regenerate.
* src/c++98/locale_init.cc: Initialize new codecvt specializations.
* src/c++98/localename.cc: Likewise.
* config/abi/pre/gnu.ver: Exports for new codecvt specializations.
* testsuite/22_locale/codecvt/utf8.cc: New.
* testsuite/22_locale/locale/cons/unicode.cc: Check that new
specializations are installed in locale objects.
From-SVN: r219747
2015-01-16 15:02:35 +00:00
Torvald Riegel
6220fdff17
libstdc++: Add POSIX variant of shared_timed_mutex.
...
* include/std/shared_mutex (shared_timed_mutex): Add POSIX-based
implementation.
From-SVN: r219737
2015-01-16 13:22:00 +00:00
Jason Merrill
caee690e91
re PR c++/64356 (Some constexpr expressions not recognized as constexpr)
...
PR c++/64356
PR libstdc++/58777
* constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
pointer expressions.
(cxx_eval_increment_expression): Likewise.
From-SVN: r219559
2015-01-13 16:04:43 -05:00
Jonathan Wakely
6eb6148159
re PR libstdc++/64571 (Link failure with fstream due to new string implementation)
...
PR libstdc++/64571
* config/abi/pre/gnu.ver: Export fstream functions using new string.
From-SVN: r219537
2015-01-13 14:56:50 +00:00
Jonathan Wakely
1b9ad1d9ae
re PR libstdc++/64553 (Missing '# ifdef _GLIBCXX_USE_WCHAR_T' in src/c++11/cxx11-shim_facet.cc)
...
PR libstdc++/64553
* src/c++11/cxx11-shim_facets.cc: Check for wchar_t support.
From-SVN: r219496
2015-01-12 21:45:50 +00:00
Jonathan Wakely
5e67acc9a0
re PR libstdc++/64560 (building libstdc++ with -fno-rtti fails in new cxx11-shim-facets.cc file)
...
PR libstdc++/64560
* src/c++11/cxx11-shim_facets.cc (locale::facet::_M_sso_shim): Check
for RTTI support.
From-SVN: r219495
2015-01-12 21:45:44 +00:00