From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103987 invoked by alias); 9 Apr 2015 15:01:51 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 103954 invoked by uid 48); 9 Apr 2015 15:01:47 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/58395] Undefined behavior vs. exception Date: Thu, 09 Apr 2015 15:01: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: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED 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: bug_status resolution Message-ID: In-Reply-To: References: 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: 2015-04/txt/msg00698.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58395 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WONTFIX --- Comment #1 from Jonathan Wakely --- (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.