public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract
@ 2013-09-06 17:33 glisse at gcc dot gnu.org
2013-09-06 18:12 ` [Bug libstdc++/58338] " daniel.kruegler at googlemail dot com
` (16 more replies)
0 siblings, 17 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-09-06 17:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
Bug ID: 58338
Summary: Add noexcept to functions with a narrow contract
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: glisse at gcc dot gnu.org
Hello,
the standard only requires a noexcept specifier on functions with a wide
contract, to allow some debug implementations of functions with a narrow
contract. However, it also explicitly gives permission to strengthen the
exception specification of non-virtual functions. I believe libstdc++ should
add noexcept whereever it can, since this is supposed to help with performance.
Functions like vector::front seem like good candidates. I wouldn't mind if the
debug version had a different exception specification, but that doesn't even
seem necessary since libstdc++ aborts instead of throwing.
https://groups.google.com/a/isocpp.org/d/msg/std-discussion/lkRyImxouC0/kZpWqI0MjXsJ
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
@ 2013-09-06 18:12 ` daniel.kruegler at googlemail dot com
2013-09-17 12:24 ` glisse at gcc dot gnu.org
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2013-09-06 18:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
I'm also very much in favor of this suggestion.
>From gcc-bugs-return-429149-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 06 18:15:07 2013
Return-Path: <gcc-bugs-return-429149-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 11243 invoked by alias); 6 Sep 2013 18:15:06 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 11187 invoked by uid 48); 6 Sep 2013 18:15:04 -0000
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
Date: Fri, 06 Sep 2013 18:15:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: paolo.carlini at oracle dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-58338-4-Rgii2QsGx5@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58338-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58338-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-09/txt/msg00389.txt.bz2
Content-length: 145
http://gcc.gnu.org/bugzilla/show_bug.cgi?idX338
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
... patches welcome!
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
2013-09-06 18:12 ` [Bug libstdc++/58338] " daniel.kruegler at googlemail dot com
@ 2013-09-17 12:24 ` glisse at gcc dot gnu.org
2013-09-18 11:21 ` glisse at gcc dot gnu.org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-09-17 12:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Tue Sep 17 12:23:54 2013
New Revision: 202650
URL: http://gcc.gnu.org/viewcvs?rev=202650&root=gcc&view=rev
Log:
2013-09-17 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
* include/bits/stl_vector.h (vector::vector(),
vector::vector(const allocator_type&)): Merge.
(_Vector_impl::_Vector_impl(_Tp_alloc_type const&),
_Vector_impl::_Vector_impl(_Tp_alloc_type&&),
_Vector_impl::_M_swap_data,
_Vector_base::_Vector_base(const allocator_type&),
_Vector_base::_Vector_base(allocator_type&&),
_Vector_base::_Vector_base(_Vector_base&&), _Vector_base::~_Vector_base,
vector::vector(const allocator_type&), vector::operator[],
vector::operator[] const, vector::front, vector::front const,
vector::back, vector::back const, vector::pop_back,
vector::_M_erase_at_end): Mark as noexcept.
* include/debug/vector (vector::vector(const _Allocator&),
vector::operator[], vector::operator[] const, vector::front,
vector::front const, vector::back, vector::back const, vector::pop_back,
_M_requires_reallocation, _M_update_guaranteed_capacity,
_M_invalidate_after_nth): Mark as noexcept.
* include/profile/vector (vector::vector(const _Allocator&),
vector::operator[], vector::operator[] const, vector::front,
vector::front const, vector::back, vector::back const): Mark as
noexcept.
(vector::vector(vector&&, const _Allocator&)): Remove wrong noexcept.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
Adjust line number.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_vector.h
trunk/libstdc++-v3/include/debug/vector
trunk/libstdc++-v3/include/profile/vector
trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
2013-09-06 18:12 ` [Bug libstdc++/58338] " daniel.kruegler at googlemail dot com
2013-09-17 12:24 ` glisse at gcc dot gnu.org
@ 2013-09-18 11:21 ` glisse at gcc dot gnu.org
2013-09-18 18:31 ` glisse at gcc dot gnu.org
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-09-18 11:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Wed Sep 18 11:21:51 2013
New Revision: 202699
URL: http://gcc.gnu.org/viewcvs?rev=202699&root=gcc&view=rev
Log:
2013-09-18 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
* include/bits/list.tcc (_List_base::_M_clear, list::erase): Mark as
noexcept.
* include/bits/stl_list.h (_List_iterator) [_List_iterator,
_M_const_cast, operator*, operator->, operator++, operator--,
operator==, operator!=]: Likewise.
(_List_const_iterator) [_List_const_iterator, _M_const_cast, operator*,
operator->, operator++, operator--, operator==, operator!=]: Likewise.
(operator==(const _List_iterator&, const _List_const_iterator&),
operator!=(const _List_iterator&, const _List_const_iterator&)):
Likewise.
(_List_impl) [_List_impl(const _Node_alloc_type&),
_List_impl(_Node_alloc_type&&)]: Likewise.
(_List_base) [_M_put_node, _List_base(const _Node_alloc_type&),
_List_base(_List_base&&), _M_clear, _M_init]: Likewise.
(list) [list(), list(const allocator_type&)]: Merge.
(list) [list(const allocator_type&), front, back, pop_front, pop_back,
erase, _M_erase]: Mark as noexcept.
* include/debug/list (list) [list(const _Allocator&), front, back,
pop_front, pop_back, _M_erase, erase]: Likewise.
* include/profile/list (list) [list(const _Allocator&), front, back,
pop_front, pop_back, erase]: Likewise.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
Adjust line number.
* testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/list.tcc
trunk/libstdc++-v3/include/bits/stl_list.h
trunk/libstdc++-v3/include/debug/list
trunk/libstdc++-v3/include/profile/list
trunk/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc
trunk/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc
trunk/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc
trunk/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (2 preceding siblings ...)
2013-09-18 11:21 ` glisse at gcc dot gnu.org
@ 2013-09-18 18:31 ` glisse at gcc dot gnu.org
2013-09-19 11:40 ` glisse at gcc dot gnu.org
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-09-18 18:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Wed Sep 18 18:31:01 2013
New Revision: 202716
URL: http://gcc.gnu.org/viewcvs?rev=202716&root=gcc&view=rev
Log:
2013-09-18 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
* include/bits/stl_iterator.h (__normal_iterator) [__normal_iterator,
_M_const_cast, operator*, operator->, operator++, operator--,
operator[], operator+=, operator+, operator-=, operator-, base]:
Mark as noexcept.
(operator==(const __normal_iterator&, const __normal_iterator&),
operator!=(const __normal_iterator&, const __normal_iterator&),
operator<(const __normal_iterator&, const __normal_iterator&),
operator>(const __normal_iterator&, const __normal_iterator&),
operator<=(const __normal_iterator&, const __normal_iterator&),
operator>=(const __normal_iterator&, const __normal_iterator&),
operator-(const __normal_iterator&, const __normal_iterator&),
operator+(difference_type, const __normal_iterator&)): Likewise.
* include/bits/stl_list.h (list) [splice, _M_check_equal_allocators]:
Likewise.
(list::_M_check_equal_allocators): Abort instead of throwing.
* include/debug/array (array) [operator[], front, back]: Mark as
noexcept.
* include/profile/array (array) [operator[], front, back]: Likewise.
* include/std/array (array) [operator[], front, back]: Likewise.
* include/debug/list (list::splice): Likewise.
* include/profile/list (list::splice): Likewise.
* testsuite/23_containers/list/operations/5.cc: Remove file.
* testsuite/23_containers/list/operations/5.h: Likewise.
Removed:
trunk/libstdc++-v3/testsuite/23_containers/list/operations/5.cc
trunk/libstdc++-v3/testsuite/23_containers/list/operations/5.h
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_iterator.h
trunk/libstdc++-v3/include/bits/stl_list.h
trunk/libstdc++-v3/include/debug/array
trunk/libstdc++-v3/include/debug/list
trunk/libstdc++-v3/include/profile/array
trunk/libstdc++-v3/include/profile/list
trunk/libstdc++-v3/include/std/array
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (3 preceding siblings ...)
2013-09-18 18:31 ` glisse at gcc dot gnu.org
@ 2013-09-19 11:40 ` glisse at gcc dot gnu.org
2013-09-20 15:50 ` glisse at gcc dot gnu.org
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-09-19 11:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Thu Sep 19 11:40:29 2013
New Revision: 202737
URL: http://gcc.gnu.org/viewcvs?rev=202737&root=gcc&view=rev
Log:
2013-09-19 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
* include/bits/stl_tree.h (_Rb_tree_node_base) [_S_minimum, _S_maximum]:
Mark as noexcept.
(_Rb_tree_iterator) [_Rb_tree_iterator, operator*, operator->,
operator++, operator--, operator==, operator!=]: Likewise.
(_Rb_tree_const_iterator) [_Rb_tree_const_iterator, _M_const_cast,
operator*, operator->, operator++, operator--, operator==, operator!=]:
Likewise.
(operator==(const _Rb_tree_iterator&, const _Rb_tree_const_iterator&),
operator!=(const _Rb_tree_iterator&, const _Rb_tree_const_iterator&)):
Likewise.
(_Rb_tree) [_M_put_node, _M_destroy_node, _M_root, _M_leftmost,
_M_rightmost, _M_begin, _M_end, _S_left, _S_right, _S_minimum,
_S_maximum]: Likewise.
* include/debug/string (basic_string) [basic_string(const _Allocator&),
shrink_to_fit, operator[], pop_back]: Likewise.
* include/ext/vstring.h (__versa_string) [_M_limit, _M_disjunct,
_M_ibegin, _M_iend, __versa_string(const _Alloc&),
operator=(__versa_string&&), shrink_to_fit, operator[], front,
back, assign(__versa_string&&), swap]: Likewise.
(__versa_string) [__versa_string(), __versa_string(const _Alloc&)]:
Merge.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_tree.h
trunk/libstdc++-v3/include/debug/string
trunk/libstdc++-v3/include/ext/vstring.h
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (4 preceding siblings ...)
2013-09-19 11:40 ` glisse at gcc dot gnu.org
@ 2013-09-20 15:50 ` glisse at gcc dot gnu.org
2013-09-24 10:07 ` glisse at gcc dot gnu.org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-09-20 15:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
--- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Fri Sep 20 15:50:09 2013
New Revision: 202781
URL: http://gcc.gnu.org/viewcvs?rev=202781&root=gcc&view=rev
Log:
2013-09-20 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
* include/bits/allocator.h (__alloc_swap::_S_do_it,
__shrink_to_fit_aux::_S_do_it): Mark as noexcept.
* include/bits/basic_string.h (basic_string::_Rep) [_S_empty_rep,
_M_is_leaked, _M_is_shared, _M_set_leaked, _M_set_sharable,
_M_set_length_and_sharable, _M_dispose]: Likewise.
(basic_string::_Alloc_hider::_Alloc_hider): Likewise.
(basic_string) [_M_data, _M_rep, _M_ibegin, _M_iend, _M_limit,
_M_disjunct, _M_copy, _M_move, _M_assign, _S_copy_chars, _S_compare,
_S_empty_rep, shrink_to_fit, operator[] const, front const, back const]:
Likewise.
[clear]: Link to PR 56166.
[swap]: Link to PR 58265.
* include/bits/stl_deque.h (_Deque_iterator) [_S_buffer_size,
_Deque_iterator, _M_const_cast, operator*, operator->, operator++,
operator--, operator+=, operator+, operator-=, operator-, operator[],
_M_set_node]: Mark as noexcept.
(operator==(const _Deque_iterator&, const _Deque_iterator&),
operator!=(const _Deque_iterator&, const _Deque_iterator&),
operator<(const _Deque_iterator&, const _Deque_iterator&),
operator>(const _Deque_iterator&, const _Deque_iterator&),
operator<=(const _Deque_iterator&, const _Deque_iterator&),
operator>=(const _Deque_iterator&, const _Deque_iterator&),
operator-(const _Deque_iterator&, const _Deque_iterator&),
operator+(ptrdiff_t, const _Deque_iterator&)): Likewise.
(_Deque_base) [_Deque_base(const allocator_type&)]: Add missing call to
_M_initialize_map.
[~_Deque_base, _M_deallocate_node, _M_deallocate_map, _M_destroy_nodes]:
Mark as noexcept.
(_Deque_base::_Deque_impl) [_Deque_impl(const _Tp_alloc_type&),
_Deque_impl(_Tp_alloc_type&&)]: Likewise.
(deque) [_S_buffer_size, operator=(deque&&), shrink_to_fit, operator[],
front, back, pop_front, pop_back, swap]: Likewise.
[deque(), deque(const allocator_type&)]: Merge.
* include/debug/deque (deque) [operator=(deque&&), shrink_to_fit,
operator[], front, back, pop_front, pop_back, swap]: Mark as noexcept.
* include/profile/deque (deque) [operator=(deque&&), operator[], front,
back, pop_front, pop_back, swap]: Likewise.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
Adjust line number.
* testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
Likewise.
* testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
Likewise.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/allocator.h
trunk/libstdc++-v3/include/bits/basic_string.h
trunk/libstdc++-v3/include/bits/stl_deque.h
trunk/libstdc++-v3/include/debug/deque
trunk/libstdc++-v3/include/profile/deque
trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (5 preceding siblings ...)
2013-09-20 15:50 ` glisse at gcc dot gnu.org
@ 2013-09-24 10:07 ` glisse at gcc dot gnu.org
2013-09-25 20:28 ` glisse at gcc dot gnu.org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-09-24 10:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
--- Comment #8 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Tue Sep 24 10:07:32 2013
New Revision: 202861
URL: http://gcc.gnu.org/viewcvs?rev=202861&root=gcc&view=rev
Log:
2013-09-24 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
PR libstdc++/56166
* include/bits/basic_string.h (basic_string)
[basic_string(basic_string&&)]: Make the noexcept conditional.
[operator=(basic_string&&), assign(basic_string&&)]: Link to PR 58265.
[begin(), end(), rbegin(), rend(), clear]: Remove noexcept.
[pop_back]: Comment on the lack of noexcept.
* include/debug/string (basic_string) [basic_string(const _Allocator&),
basic_string(basic_string&&), begin(), end(), rbegin(), rend(), clear,
operator[](size_type), pop_back]: Comment out noexcept, until vstring
replaces basic_string.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/basic_string.h
trunk/libstdc++-v3/include/debug/string
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (6 preceding siblings ...)
2013-09-24 10:07 ` glisse at gcc dot gnu.org
@ 2013-09-25 20:28 ` glisse at gcc dot gnu.org
2013-10-12 22:06 ` bredelin at ucla dot edu
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-09-25 20:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
--- Comment #9 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Wed Sep 25 20:28:12 2013
New Revision: 202924
URL: http://gcc.gnu.org/viewcvs?rev=202924&root=gcc&view=rev
Log:
2013-09-25 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
* include/bits/forward_list.h (_Fwd_list_node_base::_M_transfer_after):
Mark as noexcept.
(_Fwd_list_iterator) [_Fwd_list_iterator, operator*, operator->,
operator++, operator==, operator!=, _M_next]: Likewise.
(_Fwd_list_const_iterator) [_Fwd_list_const_iterator, operator*,
operator->, operator++, operator==, operator!=, _M_next]: Likewise.
(operator==(const _Fwd_list_iterator&, const _Fwd_list_const_iterator&),
operator!=(const _Fwd_list_iterator&, const _Fwd_list_const_iterator&)):
Likewise.
* include/bits/hashtable_policy.h (_Hash_node_base::_Hash_node_base,
_Hash_node::_M_next, _Node_iterator_base::_Node_iterator_base,
_Node_iterator_base::_M_incr, operator==(const _Node_iterator_base&,
const _Node_iterator_base&), operator!=(const _Node_iterator_base&,
const _Node_iterator_base&)): Likewise.
(_Node_iterator) [_Node_iterator, operator*, operator->, operator++]:
Likewise.
(_Node_const_iterator) [_Node_const_iterator, operator*, operator->,
operator++]: Likewise.
* include/debug/safe_iterator.h (_Safe_iterator) [_Safe_iterator,
operator=, operator*, operator->, operator++, operator--, operator[],
operator+=, operator+, operator-=, operator-, base, operator _Iterator]:
Likewise.
(operator==(const _Safe_iterator&, const _Safe_iterator&),
operator!=(const _Safe_iterator&, const _Safe_iterator&),
operator<(const _Safe_iterator&, const _Safe_iterator&),
operator<=(const _Safe_iterator&, const _Safe_iterator&),
operator>(const _Safe_iterator&, const _Safe_iterator&),
operator>=(const _Safe_iterator&, const _Safe_iterator&),
operator-(const _Safe_iterator&, const _Safe_iterator&),
operator+(difference_type, const _Safe_iterator&)): Likewise.
* include/profile/iterator_tracker.h (__iterator_tracker)
[__iterator_tracker, base, operator _Iterator, operator->, operator++,
operator--, operator=, operator*, operator[], operator+=, operator+,
operator-=, operator-]: Likewise.
(operator==(const __iterator_tracker&, const __iterator_tracker&),
operator!=(const __iterator_tracker&, const __iterator_tracker&),
operator<(const __iterator_tracker&, const __iterator_tracker&),
operator<=(const __iterator_tracker&, const __iterator_tracker&),
operator>(const __iterator_tracker&, const __iterator_tracker&),
operator>=(const __iterator_tracker&, const __iterator_tracker&),
operator-(const __iterator_tracker&, const __iterator_tracker&),
operator+(difference_type, const __iterator_tracker&)): Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/forward_list.h
trunk/libstdc++-v3/include/bits/hashtable_policy.h
trunk/libstdc++-v3/include/debug/safe_iterator.h
trunk/libstdc++-v3/include/profile/iterator_tracker.h
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (7 preceding siblings ...)
2013-09-25 20:28 ` glisse at gcc dot gnu.org
@ 2013-10-12 22:06 ` bredelin at ucla dot edu
2013-10-13 6:24 ` glisse at gcc dot gnu.org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: bredelin at ucla dot edu @ 2013-10-12 22:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
bredelin at ucla dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bredelin at ucla dot edu
--- Comment #10 from bredelin at ucla dot edu ---
It seems that these changes (see Sep 17th) also made the default constructor
explicit. While this does follow the standard, it is the subject of this
defect report:
http://cplusplus.github.io/LWG/lwg-active.html#2193
Was this change intentional?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (8 preceding siblings ...)
2013-10-12 22:06 ` bredelin at ucla dot edu
@ 2013-10-13 6:24 ` glisse at gcc dot gnu.org
2013-10-13 7:20 ` glisse at gcc dot gnu.org
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-10-13 6:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
--- Comment #11 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to bredelin from comment #10)
> Was this change intentional?
See:
http://gcc.gnu.org/ml/gcc-patches/2013-09/msg01101.html
and Paolo's reply.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (9 preceding siblings ...)
2013-10-13 6:24 ` glisse at gcc dot gnu.org
@ 2013-10-13 7:20 ` glisse at gcc dot gnu.org
2013-10-13 11:13 ` paolo.carlini at oracle dot com
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-10-13 7:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
--- Comment #12 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to bredelin from comment #10)
> http://cplusplus.github.io/LWG/lwg-active.html#2193
I suggest you open a separate bugzilla PR for this. Before my patch we were
already inconsistent about it.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (10 preceding siblings ...)
2013-10-13 7:20 ` glisse at gcc dot gnu.org
@ 2013-10-13 11:13 ` paolo.carlini at oracle dot com
2014-02-22 10:24 ` glisse at gcc dot gnu.org
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-13 11:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
--- Comment #13 from Paolo Carlini <paolo.carlini at oracle dot com> ---
In any case I see that the issue with explicit instantiation is recorded in
2193. Let's see what happens in EWG.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (11 preceding siblings ...)
2013-10-13 11:13 ` paolo.carlini at oracle dot com
@ 2014-02-22 10:24 ` glisse at gcc dot gnu.org
2021-08-31 8:19 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-02-22 10:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
--- Comment #14 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Sat Feb 22 10:24:11 2014
New Revision: 208041
URL: http://gcc.gnu.org/viewcvs?rev=208041&root=gcc&view=rev
Log:
2014-02-22 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/60308
* include/bits/stl_deque.h (_Deque_base::_Deque_base(const
allocator_type&)): Remove redundant call to _M_initialize_map.
(deque::deque(const allocator_type&)): Initialize _Base with a
constructor that calls _M_initialize_map.
Partial revert:
2013-09-20 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
(_Deque_base) [_Deque_base(const allocator_type&)]: Add missing call to
_M_initialize_map.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_deque.h
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (12 preceding siblings ...)
2014-02-22 10:24 ` glisse at gcc dot gnu.org
@ 2021-08-31 8:19 ` redi at gcc dot gnu.org
2021-08-31 8:37 ` glisse at gcc dot gnu.org
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-31 8:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Is there any low-hanging fruit left here? Can we close this?
We should accept any patches that strengthen noexcept guarantees elsewhere in
the library, we don't need a PR to do so.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (13 preceding siblings ...)
2021-08-31 8:19 ` redi at gcc dot gnu.org
@ 2021-08-31 8:37 ` glisse at gcc dot gnu.org
2023-07-09 15:29 ` dangelog at gmail dot com
2023-07-10 8:22 ` redi at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2021-08-31 8:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
Marc Glisse <glisse at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|WAITING |RESOLVED
--- Comment #16 from Marc Glisse <glisse at gcc dot gnu.org> ---
No idea if there are low hanging fruits. I think the original idea was to get
consensus on the idea to add noexcept in various places, and this seems well
accepted now.
At some point (back when I thought I would have enough free time) my plan was
to implement some form of noexcept(auto) as an extension, I think most of the
remaining places where we may want to add noexcept would benefit from that. The
effort and risk in working around the lack of this feature (writing 10+ lines
of nexcept(...), is_nothrow_*, etc) make it not worth it to me.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (14 preceding siblings ...)
2021-08-31 8:37 ` glisse at gcc dot gnu.org
@ 2023-07-09 15:29 ` dangelog at gmail dot com
2023-07-10 8:22 ` redi at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: dangelog at gmail dot com @ 2023-07-09 15:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
Giuseppe D'Angelo <dangelog at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dangelog at gmail dot com
--- Comment #17 from Giuseppe D'Angelo <dangelog at gmail dot com> ---
Hi,
How does all of this intersect with the Lakos' Rule (cf. the very recent P2837
and P2861)? I get that implementations have the freedom of strenghtening the
noexcept contract; but is this patch following some specific libstdc++ policy
(documented somewhere) -- such as, if a precondition violation is detected,
libstdc++ just abort()s the process, so technically speaking, it never throws?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libstdc++/58338] Add noexcept to functions with a narrow contract
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
` (15 preceding siblings ...)
2023-07-09 15:29 ` dangelog at gmail dot com
@ 2023-07-10 8:22 ` redi at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-10 8:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
--- Comment #18 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Our precondition checks never throw, so those functions never throw.
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2023-07-10 8:22 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-06 17:33 [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract glisse at gcc dot gnu.org
2013-09-06 18:12 ` [Bug libstdc++/58338] " daniel.kruegler at googlemail dot com
2013-09-17 12:24 ` glisse at gcc dot gnu.org
2013-09-18 11:21 ` glisse at gcc dot gnu.org
2013-09-18 18:31 ` glisse at gcc dot gnu.org
2013-09-19 11:40 ` glisse at gcc dot gnu.org
2013-09-20 15:50 ` glisse at gcc dot gnu.org
2013-09-24 10:07 ` glisse at gcc dot gnu.org
2013-09-25 20:28 ` glisse at gcc dot gnu.org
2013-10-12 22:06 ` bredelin at ucla dot edu
2013-10-13 6:24 ` glisse at gcc dot gnu.org
2013-10-13 7:20 ` glisse at gcc dot gnu.org
2013-10-13 11:13 ` paolo.carlini at oracle dot com
2014-02-22 10:24 ` glisse at gcc dot gnu.org
2021-08-31 8:19 ` redi at gcc dot gnu.org
2021-08-31 8:37 ` glisse at gcc dot gnu.org
2023-07-09 15:29 ` dangelog at gmail dot com
2023-07-10 8:22 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).