This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/58395] Undefined behavior vs. exception
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Apr 2015 15:01:47 +0000
- Subject: [Bug libstdc++/58395] Undefined behavior vs. exception
- Auto-submitted: auto-generated
- References: <bug-58395-4 at http dot gcc dot gnu dot org/bugzilla/>
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.