public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* egcs and ios::failure
@ 1998-05-01 22:26 Peter  Garner
  1998-05-02  3:51 ` Gerald Pfeifer
  0 siblings, 1 reply; 5+ messages in thread
From: Peter  Garner @ 1998-05-01 22:26 UTC (permalink / raw)
  To: egcs; +Cc: bothner

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: egcs and ios::failure
  1998-05-01 22:26 egcs and ios::failure Peter  Garner
@ 1998-05-02  3:51 ` Gerald Pfeifer
  0 siblings, 0 replies; 5+ messages in thread
From: Gerald Pfeifer @ 1998-05-02  3:51 UTC (permalink / raw)
  To: Peter Garner; +Cc: egcs, bothner

On Thu, 2 May 1996, Peter  Garner wrote:
>   I recently downloaded egcs-19980425 since I would like an
> ISO C++ compiler. [...]

Which platform are you using (output of `gcc -v` for example)?

Gerald


PS: Aehm, I've now received three identical message from you to the list
    within a couple of minutes...
-- 
Gerald Pfeifer (Jerry)      Vienna University of Technology
pfeifer@dbai.tuwien.ac.at   http://www.dbai.tuwien.ac.at/~pfeifer/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: egcs and ios::failure
  1998-05-02 14:30 Peter  Garner
  1998-05-02 18:56 ` Jean-Pierre Radley
@ 1998-05-03 10:37 ` Gerald Pfeifer
  1 sibling, 0 replies; 5+ messages in thread
From: Gerald Pfeifer @ 1998-05-03 10:37 UTC (permalink / raw)
  To: Peter Garner; +Cc: egcs

On Sat, 2 May 1998, Peter  Garner wrote:
> Is it possible that I am accidently linking with a library that came
> with the RedHat distribution instead of the egcs library?\x03I noticed I
> have 3 distinct libiberty.a on my machine! 

Have you tried actually running gcc/g++ (from egcs) with option -v?

If you do that, you'll get a bunch of information, among others the
library paths used...

Gerald
-- 
Gerald Pfeifer (Jerry)      Vienna University of Technology
pfeifer@dbai.tuwien.ac.at   http://www.dbai.tuwien.ac.at/~pfeifer/



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: egcs and ios::failure
  1998-05-02 14:30 Peter  Garner
@ 1998-05-02 18:56 ` Jean-Pierre Radley
  1998-05-03 10:37 ` Gerald Pfeifer
  1 sibling, 0 replies; 5+ messages in thread
From: Jean-Pierre Radley @ 1998-05-02 18:56 UTC (permalink / raw)
  To: EGCS Developers

Peter  Garner telecommunicated (on 02May):
| 
| >PS: Aehm, I've now received three identical message from
| >you to the list within a couple of minutes... 
| 
| Yes, I am very sorry about that.  I hate to do something so
| foolish with my first post in this list!  The first two
| times I sent that message, my pop mail server reported that
| the delivery was unsuccessful, and that the network
| connection had been lost.  I was terribly embarrassed when
| I saw all 3 copies had been recieved!

And all three of them had a date of 2May1996, and did not have a Subject
line either.

-- 
Jean-Pierre Radley <jpr@jpr.com>  XC/XT Custodian   Sysop, CompuServe SCOForum

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: egcs and ios::failure
@ 1998-05-02 14:30 Peter  Garner
  1998-05-02 18:56 ` Jean-Pierre Radley
  1998-05-03 10:37 ` Gerald Pfeifer
  0 siblings, 2 replies; 5+ messages in thread
From: Peter  Garner @ 1998-05-02 14:30 UTC (permalink / raw)
  To: pfeifer; +Cc: egcs

>Which platform are you using (output of `gcc -v` for
>example)? 

I am running on Redhat Linux V5.0 with a Pentium II,  The
output of gcc -v is :

gcc version egcs-2.91.25 19980425 (gcc2 ss-980401 experimental)

In addition, snooping around with gdb I have found the error
(fault) occurs at line 60 of memcpy.c.  However, there is
no line 60 in the memcpy.c that comes with that snapshot.
Is it possible that I am accidently linking with a library
that came with the RedHat distribution instead of the egcs
library?\x03I noticed I have 3 distinct libiberty.a on my
machine!


>PS: Aehm, I've now received three identical message from
>you to the list within a couple of minutes... 

Yes, I am very sorry about that.  I hate to do something so
foolish with my first post in this list!  The first two
times I sent that message, my pop mail server reported that
the delivery was unsuccessful, and that the network
connection had been lost.  I was terribly embarrassed when
I saw all 3 copies had been recieved!


Thanks

Peter


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-05-03 10:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-01 22:26 egcs and ios::failure Peter  Garner
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

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).