PR66145 use new ABI for std::ios::failure exceptions
[gcc.git] / libstdc++-v3 / ChangeLog
1 2017-01-16 Jonathan Wakely <jwakely@redhat.com>
2
3 PR libstdc++/66145
4 * src/c++11/functexcept.cc: Use new ABI for std::ios_base::failure
5 exceptions.
6 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Don't override ABI
7 for test, so new ios::failure can be caught.
8 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
9 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
10 exceptions_failbit.cc: Likewise.
11 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
12 exceptions_failbit.cc: Likewise.
13 * testsuite/27_io/basic_istream/extractors_other/char/
14 exceptions_null.cc: Likewise.
15 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
16 exceptions_null.cc: Likewise.
17 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
18 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
19 * testsuite/27_io/basic_ostream/inserters_other/char/
20 exceptions_null.cc: Likewise.
21 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
22 exceptions_null.cc: Likewise.
23 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
24
25 PR libstdc++/78702
26 * include/bits/locale_classes.h (locale::facet::__shim): Change from
27 private to protected.
28 * src/c++11/cxx11-shim_facets.cc (__shim_accessor): Define helper to
29 make locale::facet::__shim accessible.
30
31 2017-01-16 Ville Voutilainen <ville.voutilainen@gmail.com>
32
33 PR libstdc++/78389
34 * include/bits/list.tcc (merge(list&&)): Fix backwards size adjustments.
35 (merge(list&&, _StrictWeakOrdering)): Likewise.
36 * testsuite/23_containers/list/operations/78389.cc: Add
37 better test for the sizes.
38
39 2017-01-14 Jonathan Wakely <jwakely@redhat.com>
40
41 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
42 Skip test when -D_GLIBCXX_PROFILE mode is included in options.
43 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
44 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
45 Likewise.
46 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
47 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
48 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
49 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
50 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
51 Likewise.
52 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc::
53 Likewise.
54 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc::
55 Likewise.
56 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
57 Likewise.
58 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
59 Likewise.
60 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
61 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
62 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
63 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
64 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
65 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
66 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
67 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
68 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
69 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
70 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
71 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
72 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
73
74 2017-01-13 Jonathan Wakely <jwakely@redhat.com>
75
76 PR libstdc++/65411
77 * config/io/basic_file_stdio.cc (__basic_file<char>::close()): Don't
78 retry fclose on EINTR.
79
80 * include/profile/base.h: Remove unused header that leads to header
81 cycle in C++17 mode.
82
83 PR libstdc++/79075
84 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string):
85 Make _If_sv private.
86 [!_GLIBCXX_USE_CXX11_ABI] (basic_string): Add member functions taking
87 basic_string_view arguments.
88
89 PR libstdc++/79075
90 * testsuite/lib/libstdc++.exp (check_v3_target_filesystem_ts): Remove
91 redundant option from cxxflags.
92 (check_effective_target_cxx11-abi): Define.
93 * testsuite/21_strings/basic_string/allocator/71964.cc: Use cxx11-abi
94 effective target.
95 * testsuite/21_strings/basic_string/allocator/char/copy.cc: Likewise.
96 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
97 Likewise.
98 * testsuite/21_strings/basic_string/allocator/char/minimal.cc:
99 Likewise.
100 * testsuite/21_strings/basic_string/allocator/char/move.cc: Likewise.
101 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
102 Likewise.
103 * testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
104 Likewise.
105 * testsuite/21_strings/basic_string/allocator/char/swap.cc: Likewise.
106 * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
107 Likewise.
108 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
109 Likewise.
110 * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
111 Likewise.
112 * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
113 Likewise.
114 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
115 Likewise.
116 * testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
117 Likewise.
118 * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
119 Likewise.
120 * testsuite/23_containers/list/61347.cc: Likewise.
121 * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
122 * testsuite/27_io/ios_base/failure/cxx11.cc: Likewise.
123
124 2017-01-13 Ville Voutilainen <ville.voutilainen@gmail.com>
125
126 PR libstdc++/78389
127 * include/bits/list.tcc (merge(list&&)):
128 Adjust list sizes if the comparator throws.
129 (merge(list&&, _StrictWeakOrdering)): Likewise.
130 (sort()): Splice elements back from the scratch buffers
131 if the comparator throws.
132 (sort(_StrictWeakOrdering)): Likewise.
133 * testsuite/23_containers/list/operations/78389.cc: New.
134
135 2017-01-13 Jonathan Wakely <jwakely@redhat.com>
136
137 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Mark
138 XFAIL for C++17 until node reinsertion supports fancy pointers.
139
140 PR libstdc++/78361
141 * testsuite/20_util/add_pointer/value.cc: Test forming function
142 pointers.
143
144 2017-01-13 Michael Brune <lucdanton@free.fr>
145
146 PR libstdc++/78361
147 * include/std/type_traits (__is_referenceable): Handle noexcept
148 function types.
149
150 2017-01-12 Jonathan Wakely <jwakely@redhat.com>
151
152 PR libstdc++/77528
153 * include/bits/stl_queue.h (queue, priority_queue): Remove default
154 member-initializers and define default constructors as templates with
155 constraints.
156 * include/bits/stl_stack.h (stack): Likewise.
157 * testsuite/23_containers/priority_queue/requirements/constructible.cc:
158 New.
159 * testsuite/23_containers/priority_queue/requirements/
160 explicit_instantiation/1.cc: Test more instantiations.
161 * testsuite/23_containers/priority_queue/requirements/
162 explicit_instantiation/1_c++98.cc: Likewise.
163 * testsuite/23_containers/queue/requirements/constructible.cc: New.
164 * testsuite/23_containers/stack/requirements/constructible.cc: New.
165
166 PR libstdc++/66284
167 * doc/xml/manual/intro.xml: Document LWG 2781 change.
168 * doc/html/*: Regenerate.
169 * include/std/functional (_Function_base::_Ref_manager): Remove.
170 (_Function_handler): Remove partial specializations for
171 reference_wrapper.
172 (function::target): Remove special case for const qualification.
173 * testsuite/20_util/function/6.cc: Adjust tests for target type.
174 * testsuite/20_util/function/7.cc: Likewise.
175 * testsuite/20_util/function/8.cc: Likewise.
176
177 2017-01-11 Jonathan Wakely <jwakely@redhat.com>
178
179 PR libstdc++/78134
180 * include/bits/stl_map.h (map::lower_bound, map::upper_bound)
181 (map::equal_range): Fix return type of heterogeneous overloads.
182 * include/bits/stl_multimap.h (multimap::lower_bound)
183 (multimap::upper_bound, multimap::equal_range): Likewise.
184 * include/bits/stl_multiset.h (multiset::lower_bound)
185 (multiset::upper_bound, multiset::equal_range): Likewise.
186 * include/bits/stl_set.h (set::lower_bound, set::upper_bound)
187 (set::equal_range): Likewise.
188 * testsuite/23_containers/map/operations/2.cc
189 * testsuite/23_containers/multimap/operations/2.cc
190 * testsuite/23_containers/multiset/operations/2.cc
191 * testsuite/23_containers/set/operations/2.cc
192
193 PR libstdc++/78273
194 * include/bits/stl_map.h (map::count<_Kt>(const _Kt&)): Don't assume
195 the heterogeneous comparison can only find one match.
196 * include/bits/stl_set.h (set::count<_Kt>(const _Kt&)): Likewise.
197 * testsuite/23_containers/map/operations/2.cc: Test count works with
198 comparison function that just partitions rather than sorting.
199 * testsuite/23_containers/set/operations/2.cc: Likewise.
200
201 2017-01-11 Ville Voutilainen <ville.voutilainen@gmail.com>
202
203 Reduce the size of variant, it doesn't need an index of
204 type size_t internally.
205 * include/std/variant (parse_numbers.h): New include.
206 (__select_index): New.
207 (_Variant_storage<false, _Types...>::_M_reset_impl): Use
208 _index_type for comparison with variant_npos.
209 (_Variant_storage<false, _Types...>::__index_type): New.
210 (_Variant_storage<false, _Types...>::_M_index): Change the
211 type from size_t to __index_type.
212 (_Variant_storage<true, _Types...>::__index_type): New.
213 (_Variant_storage<true, _Types...>::_M_index): Change the
214 type from size_t to __index_type.
215 (_Variant_base::_M_valid): Use _Storage::__index_type
216 for comparison with variant_npos.
217 (variant::index): Use _Base::_Storage::__index_type
218 for comparison with variant_npos.
219 * testsuite/20_util/variant/index_type.cc: New.
220
221 2017-01-10 Jonathan Wakely <jwakely@redhat.com>
222
223 * testsuite/18_support/exception_ptr/60612-unexpected.cc: Adjust
224 effective target selector to prevent running in C++17 mode.
225
226 PR libstdc++/77528
227 * include/bits/stl_queue.h (queue::c): Add default member initializer.
228 (queue::queue()): Add constructor and define as defaulted.
229 (queue::queue(_Sequence&&)): Remove default argument.
230 (priority_queue::c, priority_queue::comp): Add default member
231 initializers.
232 (priority_queue::priority_queue()): Add constructor and define as
233 defaulted.
234 (priority_queue::priority_queue(const _Compare&, _Sequence&&)):
235 Remove default argument for first parameter.
236 * include/bits/stl_stack.h (stack::c): Add default member initializer.
237 (stack::stack()): Add constructor and define as defaulted.
238 (stack::stack(const _Sequence&)): Remove default argument.
239 * testsuite/23_containers/priority_queue/requirements/
240 explicit_instantiation/1.cc: Test explicit instantiation with
241 non-DefaultConstructible sequence.
242 * testsuite/23_containers/priority_queue/77528.cc: New test.
243 * testsuite/23_containers/priority_queue/requirements/
244 explicit_instantiation/1_c++0x.cc: Replace with 1_c++98.cc.
245 * testsuite/23_containers/queue/77528.cc: New test.
246 * testsuite/23_containers/queue/requirements/explicit_instantiation/
247 1.cc: Test explicit instantiation with non-DefaultConstructible
248 sequence.
249 * testsuite/23_containers/queue/requirements/explicit_instantiation/
250 1_c++0x.cc: Replace with 1_c++98.cc.
251 * testsuite/23_containers/stack/77528.cc: New test.
252 * testsuite/23_containers/stack/requirements/explicit_instantiation/
253 1.cc: Test explicit instantiation with non-DefaultConstructible
254 sequence.
255 * testsuite/23_containers/stack/requirements/explicit_instantiation/
256 1_c++0x.cc: Replace with 1_c++98.cc.
257
258 2017-01-10 Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
259
260 * include/bits/locale_facets_nonio.tcc
261 (time_get::_M_extract_via_format): Avoid compilation errors with
262 non-standard struct tm.
263
264 2017-01-10 François Dumont <fdumont@gcc.gnu.org>
265 Jonathan Wakely <jwakely@redhat.com>
266
267 * python/libstdcxx/v6/printers.py (_versioned_namespace): Define.
268 (is_specialization, strip_versioned_namespace): New helpers functions
269 to work with symbols in the versioned namespace.
270 (Printer.add_version): Add second name using versioned namespace.
271 (add_one_template_type_printer, add_one_type_printer): Add second
272 type printers using versioned namespace.
273 (register_type_printers): Add template type printer for basic_string.
274 (build_libstdcxx_dictionary): Remove dead code.
275 * python/libstdcxx/v6/xmethods.py: Make all matchers look for
276 versioned namespace.
277 * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
278 results.
279 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
280
281 2017-01-09 Jonathan Wakely <jwakely@redhat.com>
282
283 PR libstdc++/79017
284 * acinclude.m4 (GLIBCXX_CHECK_C99_TR1): Check for llrint and llround
285 functions separately on darwin and if they're missing define
286 _GLIBCXX_NO_C99_ROUNDING_FUNCS.
287 * config.h.in: Regenerate.
288 * configure: Regenerate.
289 * include/c_global/cmath [_GLIBCXX_NO_C99_ROUNDING_FUNCS] (llrint)
290 (llrintf, llrintl, llround, llroundf, llroundl): Do not define.
291
292 * testsuite/30_threads/condition_variable/members/3.cc: Use new macro
293 to detect correct thread_local destructors.
294 * testsuite/util/testsuite_hooks.h (CORRECT_THREAD_LOCAL_DTORS):
295 Define.
296
297 2017-01-09 Jonathan Wakely <jwakely@redhat.com>
298 Aditya Kumar <hiraditya@msn.com>
299
300 PR libstdc++/66414
301 * include/bits/basic_string.tcc
302 (basic_string::find(const CharT*, size_type, size_type)): Optimize.
303
304 2017-01-06 Jonathan Wakely <jwakely@redhat.com>
305
306 * testsuite/21_strings/basic_string/operations/find/char/6.cc: New.
307 * testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc: New.
308
309 * testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp:
310 Include <cassert> header.
311
312 PR libstdc++/78968
313 * crossconfig.m4: Check for __cxa_thread_atexit on *-*-freebsd*.
314 * configure: Regenerate.
315
316 2017-01-06 Barrett Adair <barrettellisadair@gmail.com>
317 Jonathan Wakely <jwakely@redhat.com>
318
319 * include/std/variant (variant, swap): Replace __and_ usage with fold
320 expressions.
321
322 2017-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
323
324 PR go/78978
325 * acinclude.m4 (GLIBCXX_CHECK_ASSEMBLER_HWCAP): Remove.
326 * configure.ac: Call GCC_CHECK_ASSEMBLER_HWCAP instead of
327 GLIBCXX_CHECK_ASSEMBLER_HWCAP.
328 * fragment.am (CONFIG_CXXFLAGS): Use HWCAP_CFLAGS instead of
329 HWCAP_FLAGS.
330 * aclocal.m4: Regenerate.
331 * configure: Regenerate.
332 * Makefile.in, doc/Makefile.in, include/Makefile.in,
333 libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in,
334 src/Makefile.in, src/c++11/Makefile.in, src/c++98/Makefile.in,
335 src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.
336
337 2017-01-06 Jonathan Wakely <jwakely@redhat.com>
338
339 * include/bits/c++config (_GLIBCXX_ASSERTIONS): Avoid redefinition.
340
341 PR libstdc++/78991
342 * include/bits/predefined_ops.h (_Iter_comp_iter, _Iter_comp_val)
343 (_Val_comp_iter, _Iter_equals_val, _Iter_pred, _Iter_comp_to_val)
344 (_Iter_comp_to_iter, _Iter_negate): Make constructors explicit and
345 move function objects.
346 (__iter_comp_iter, __iter_comp_val, __val_comp_iter, __pred_iter)
347 (__iter_comp_val, __iter_comp_iter, __negate): Move function objects.
348 * testsuite/25_algorithms/sort/78991.cc: New test.
349
350 2017-01-05 Jonathan Wakely <jwakely@redhat.com>
351
352 * include/bits/std_function.h (function::_Signature_type): Remove.
353 (function::function(_Functor)): Adjust.
354
355 2017-01-05 Tim Shen <timshen@google.com>
356
357 PR libstdc++/78996
358 * include/std/variant (__gen_vtable_impl): rename __unused to
359 __dimensions to avoid naming conflict.
360
361 2017-01-04 Jonathan Wakely <jwakely@redhat.com>
362
363 PR libstdc++/78968
364 * config.h.in: Regenerate.
365 * configure: Likewise.
366 * configure.ac: Check for __cxa_thread_atexit.
367 * libsupc++/atexit_thread.cc [_GLIBCXX_HAVE___CXA_THREAD_ATEXIT]:
368 Don't define __cxa_thread_atexit if libc provides it.
369
370 2017-01-04 Ville Voutilainen <ville.voutilainen@gmail.com>
371
372 Implement 2801, Default-constructibility of unique_ptr.
373 * include/bits/unique_ptr.h (__uniq_ptr_impl::_DeleterConstraint): New.
374 (unique_ptr::_DeleterConstraint): Likewise.
375 (unique_ptr()): Constrain.
376 (unique_ptr(pointer)): Likewise.
377 (unique_ptr(nullptr_t)): Likewise.
378 (unique_ptr<_Tp[], _Dp>::_DeleterConstraint): New.
379 (unique_ptr<_Tp[], _Dp>::unique_ptr()): Constrain.
380 (unique_ptr<_Tp[], _Dp>::unique_ptr(_Up)): Likewise.
381 (unique_ptr<_Tp[], _Dp>::unique_ptr(nullptr_t)): Likewise.
382 * testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust.
383 * testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Likewise.
384 * testsuite/20_util/unique_ptr/cons/default.cc: New.
385 * testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc: Adjust.
386
387 2017-01-04 Pauli Nieminen <suokkos@gmail.com>
388 Jonathan Wakely <jwakely@redhat.com>
389
390 PR libstdc++/64735
391 * acinclude.m4 (GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER): Define.
392 * config.h.in: Regenerate.
393 * config/abi/pre/gnu.ver [HAVE_EXCEPTION_PTR_SINCE_GCC46]
394 (GLIBCXX_3.4.15, GLIBCXX_3.4.21, CXXABI_1.3.3, CXXABI_1.3.5): Make
395 exports for exception_ptr, nested_exception, and future conditional.
396 [HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.23, CXXABI_1.3.11): Add
397 exports for exception_ptr, nested_exception, and future conditional.
398 * configure: Regenerate.
399 * configure.ac: Use GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER.
400 * include/std/future: Remove check for ATOMIC_INT_LOCK_FREE
401 * libsupc++/eh_atomics.h: New file for internal use only.
402 (__eh_atomic_inc, __eh_atomic_dec): New.
403 * libsupc++/eh_ptr.cc (exception_ptr::_M_addref)
404 (exception_ptr::_M_release) (__gxx_dependent_exception_cleanup)
405 (rethrow_exception): Use eh_atomics.h reference counting helpers.
406 * libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise.
407 * libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise.
408 * libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE.
409 * libsupc++/exception_ptr.h: Likewise.
410 * libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro.
411 * libsupc++/nested_exception.cc: Remove check for
412 ATOMIC_INT_LOCK_FREE.
413 * libsupc++/nested_exception.h: Likewise.
414 * src/c++11/future.cc: Likewise.
415 * testsuite/18_support/exception_ptr/*: Remove atomic builtins checks.
416 * testsuite/18_support/nested_exception/*: Likewise.
417 * testsuite/30_threads/async/*: Likewise.
418 * testsuite/30_threads/future/*: Likewise.
419 * testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
420 * testsuite/30_threads/packaged_task/*: Likewise.
421 * testsuite/30_threads/promise/*: Likewise.
422 * testsuite/30_threads/shared_future/*: Likewise.
423
424 2017-01-03 Gerald Pfeifer <gerald@pfeifer.com>
425
426 * doc/xml/manual/documentation_hacking.xml: sourceforge.net now
427 defaults to https; adjust reference.
428
429 2017-01-03 Jonathan Wakely <jwakely@redhat.com>
430
431 PR libstdc++/78956
432 * include/std/thread (thread(const thread&&)): Add deleted
433 constructor.
434 * testsuite/30_threads/thread/cons/lwg2097.cc: New test.
435
436 * doc/xml/manual/spine.xml: Update copyright years.
437 * doc/xml/manual/build_hacking.xml: Fix spelling of libbuilddir.
438 * doc/xml/manual/test.xml: Likewise.
439 * doc/html/*: Regenerate.
440
441 2017-01-01 Gerald Pfeifer <gerald@pfeifer.com>
442
443 * doc/xml/faq.xml: Update address of C++ ABI link.
444 * doc/xml/manual/abi.xml: Ditto.
445
446 2017-01-01 Jakub Jelinek <jakub@redhat.com>
447
448 Update copyright years.
449 \f
450 Copyright (C) 2017 Free Software Foundation, Inc.
451
452 Copying and distribution of this file, with or without modification,
453 are permitted in any medium without royalty provided the copyright
454 notice and this notice are preserved.