From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5420 invoked by alias); 30 Jan 2007 01:42:39 -0000 Received: (qmail 5397 invoked by uid 48); 30 Jan 2007 01:42:30 -0000 Date: Tue, 30 Jan 2007 01:42:00 -0000 Message-ID: <20070130014230.5396.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/14493] std::bad_alloc::what() does not explain what happened In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pcarlini at suse dot de" 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 X-SW-Source: 2007-01/txt/msg02555.txt.bz2 ------- Comment #22 from pcarlini at suse dot de 2007-01-30 01:42 ------- (In reply to comment #21) > I suspect Andrew Pinski's point might be that what() could return a > string that represents the name of the most derived type of the > exception. But, nothing so far forces to do that. A reasonable > definition is to what Paolo suggest, with clear documentation (that > mentions this). Agreed. Gaby, do you have any strong opinion about std::exception itself? In my current patch draft I'm leaving it alone, but in principle we could change also its what() to return "std::exception" instead of typeid(*this).name(). In other terms, I'm not sure whether your Comment #13 contrary to the mangled typeid applies also to the base std::exception... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14493