public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/58395] Undefined behavior vs. exception
       [not found] <bug-58395-4@http.gcc.gnu.org/bugzilla/>
@ 2015-04-09 15:01 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: redi at gcc dot gnu.org @ 2015-04-09 15:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58395

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to frankhb1989 from comment #0)
> is somewhat confusing for users not so familiar with the standard.

I'm not convinced by this.

Doing something like passing a null pointer to std::string is a mistake.
Whether we throw an exception of one type or another type, or abort, or
segfault, the user needs to fix their code. I don't see why adding a new type
(along with its typeinfo and vtable) to the library will make it any easier.

I don't see why the user should care that our method of reporting their mistake
is specific to our implementation, they still need to fix the mistake.

Good messages in what() are helpful, but we don't need a new type with a
special prefix for that.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-09 15:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-58395-4@http.gcc.gnu.org/bugzilla/>
2015-04-09 15:01 ` [Bug libstdc++/58395] Undefined behavior vs. exception 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).