public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/21772] exception safety testing
Date: Fri, 01 Jan 2010 03:55:00 -0000	[thread overview]
Message-ID: <20100101035458.8783.qmail@sourceware.org> (raw)
In-Reply-To: <bug-21772-365@http.gcc.gnu.org/bugzilla/>



------- Comment #18 from bkoz at gcc dot gnu dot org  2010-01-01 03:54 -------

> multiset error

... was bogus. I adjusted the traits to fix this.

> The std::array error seems indeed bogus: if I'm not wrong, it happens when
> swapping arrays, and there are no  guarantees that the operation doesn't throw
> for std::array, because it's requires to just swap the ranges, thus copy
> construct and copy assign each array element.

It does happen when swapping arrays. I believe that array::swap does have a
strong requirement via 23.2.1 p 10, but have xfailed this for the moment.

In addition, I have removed the throwing on user defined ctors for
throw_value_* via _GLIBCXX_IS_AGGREGATE to simulate a more aggregate-ish thing.
However, even aggregates can have assignment operators and other operator
actions that throw, and this still fails. (And note the value_type of
std::array can have user defined ctors ie 8.5.1 p 13). 

> Another thing I noticed, about basic_string, something seems inappropriate for
> it in the framework, since the value_type must be a POD!

Four specializations are defined: char, wchar_t, char16_t, char32_t. That is
the only part of basic_string that is special WRT container requirements that I
can see. 

?

I went ahead and checked this in, xfailing the following failures:

FAIL: 21_strings/basic_string/requirements/exception/propagation_consistent.cc
execution test
FAIL: 23_containers/array/requirements/exception/generation_prohibited.cc
execution test
FAIL: 23_containers/deque/requirements/exception/generation_prohibited.cc
execution test
FAIL: 23_containers/deque/requirements/exception/propagation_consistent.cc
execution test
FAIL: 23_containers/vector/requirements/exception/generation_prohibited.cc
execution test


I believe that deque/.../propagation_consistent.cc will have to be modified to
take into account 23.3.2.3, and copy/assignment should be elided in this case
(and vector via 23.3.6.4) 

Regardless, this can be tweaked in place.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21772


  parent reply	other threads:[~2010-01-01  3:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-21772-365@http.gcc.gnu.org/bugzilla/>
2007-05-21  8:27 ` [Bug libstdc++/21772] exception safety testing allocator pcarlini at suse dot de
2007-05-21 14:58 ` bkoz at gcc dot gnu dot org
2007-05-21 16:16 ` dave at boost-consulting dot com
2007-05-21 17:13 ` pcarlini at suse dot de
2007-05-27 23:07 ` dave at boost-consulting dot com
2009-12-16  3:34 ` [Bug libstdc++/21772] exception safety testing bkoz at gcc dot gnu dot org
2009-12-16  3:34 ` [Bug libstdc++/21772] exception safety testing allocator bkoz at gcc dot gnu dot org
2009-12-16  3:36 ` [Bug libstdc++/21772] exception safety testing bkoz at gcc dot gnu dot org
2009-12-16  5:17 ` bkoz at gcc dot gnu dot org
2009-12-16 10:14 ` paolo dot carlini at oracle dot com
2009-12-16 11:14 ` jwakely dot gcc at gmail dot com
2009-12-17  8:18 ` bkoz at gcc dot gnu dot org
2009-12-17  9:37 ` bkoz at gcc dot gnu dot org
2009-12-17  9:58 ` paolo dot carlini at oracle dot com
2010-01-01  3:39 ` bkoz at gcc dot gnu dot org
2010-01-01  3:55 ` bkoz at gcc dot gnu dot org [this message]
2010-01-01 10:14 ` paolo dot carlini at oracle dot com
2010-01-01 10:46 ` paolo dot carlini at oracle dot com
2010-01-01 11:03 ` paolo dot carlini at oracle dot com
2010-02-19 10:49 ` paolo dot carlini at oracle dot com
2010-03-04 12:00 ` paolo dot carlini at oracle dot com
     [not found] <bug-21772-4@http.gcc.gnu.org/bugzilla/>
2023-05-16 19:41 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100101035458.8783.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).