From mboxrd@z Thu Jan 1 00:00:00 1970 From: pere@hungry.com To: gcc-gnats@gcc.gnu.org Subject: libstdc++/2921: exception::what() return '9exception', not 'exception' Date: Thu, 24 May 2001 01:26:00 -0000 Message-id: <20010524082308.16628.qmail@sourceware.cygnus.com> X-SW-Source: 2001-05/msg00710.html List-Id: >Number: 2921 >Category: libstdc++ >Synopsis: exception::what() return '9exception', not 'exception' >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu May 24 01:26:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Petter Reinholdtsen >Release: gcc-2.95.2 >Organization: >Environment: Debian GNU/Linux 2.2 >Description: std::exception::what() returns a string describing the exception. The string returned is '9exception', while I believe it should be 'exception'. Compare this to std::bad_alloc::what() which return 'bad_alloc'. >How-To-Repeat: Compile and run the enclosed program and check the output: Catched: 9exception Catched: bad_alloc >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/x-c++src; name="gcc-exception-test.cpp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gcc-exception-test.cpp" LyoKCiAgJSBnY2MgLS12ZXJzaW9uCiAgMi45NS4yCiAgJSBjKysgLW8gZ2NjLWV4Y2VwdGlvbi10 ZXN0IGdjYy1leGNlcHRpb24tdGVzdC5jcHAKICAlIC4vZ2NjLWV4Y2VwdGlvbi10ZXN0CiAgQ2F0 Y2hlZDogOWV4Y2VwdGlvbgogIENhdGNoZWQ6IGJhZF9hbGxvYwogICUKCiAgSSBFeHBlY3RlZCAn ZXhjZXB0aW9uJywgbm90ICc5ZXhjZXB0aW9uJy4KICovCgojaW5jbHVkZSA8ZXhjZXB0aW9uPgoj aW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDxuZXc+Cgp0ZW1wbGF0ZSA8Y2xhc3MgVD4Kdm9p ZCB0aHJvd2NhdGNoKFQgdCkKewogIHRyeSB7CiAgICB0aHJvdyBUKCk7CiAgfSBjYXRjaCAoY29u c3Qgc3RkOjpleGNlcHRpb24gJmUpIHsKICAgIHN0ZDo6Y291dCA8PCAiQ2F0Y2hlZDogIiA8PCBl LndoYXQoKSA8PCBzdGQ6OmVuZGw7CiAgfQp9CgppbnQKbWFpbigpCnsKICB0aHJvd2NhdGNoKHN0 ZDo6ZXhjZXB0aW9uKCkpOwogIHRocm93Y2F0Y2goc3RkOjpiYWRfYWxsb2MoKSk7CiAgcmV0dXJu IDA7Cn0K