From: "Peter Garner" <peter.garner@toward.com>
To: egcs@cygnus.com
Cc: bothner@cygnus.com
Subject: egcs and ios::failure
Date: Fri, 01 May 1998 22:26:00 -0000 [thread overview]
Message-ID: <9605020025.AA1966598@piglet.toward.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]
Good Day all!
I recently downloaded egcs-19980425 since I would like an
ISO C++ compiler. To get the right file errors, I patched
streambuf.h and streambuf.cc so that it would throw an
ios::failure exception (that class being a child of
exception per the ISO draft.) When I attempt to use this I
get a segmentation fault. I thought you might like to see
this. I have attached a file "test.tar" that contains the
difference between the original and patched h file
(hdiff.txt) and the difference between the original and
patched cc file (ccdiff.txt) and fexcptst.cpp, a simple
program that tests / causes the segmentation fault.
Lastly, please pardon me, but I noticed that the original
threw an exception by pointer. In general isn't that a
very bad idea? I was always taught to write a copy
constructor for all exceptions and always throw by value,
never by new. Doesn't a construct like :
throw new failure ( this )
lead to a memory leak since it becomes the responsibility
of the catch block to delete the pointer?
Thanks
Peter
[-- Attachment #2: test.tar --]
[-- Type: application/x-tar, Size: 10240 bytes --]
next reply other threads:[~1998-05-01 22:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-01 22:26 Peter Garner [this message]
1998-05-02 3:51 ` Gerald Pfeifer
1998-05-02 14:30 Peter Garner
1998-05-02 18:56 ` Jean-Pierre Radley
1998-05-03 10:37 ` Gerald Pfeifer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9605020025.AA1966598@piglet.toward.com \
--to=peter.garner@toward.com \
--cc=bothner@cygnus.com \
--cc=egcs@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).