On Mon, Apr 23, 2001 at 09:37:09AM -0700, Philippe Troin wrote: > Ben Collins <[EMAIL PROTECTED]> writes: > > > On Sun, Apr 22, 2001 at 11:31:18PM -0700, Philippe Troin wrote: > > > [EMAIL PROTECTED]:~% gcc -o foo foo.cpp -lstdc++ > > > > IMO, you should use: > > > > % g++ foo foo.cpp > > This brings the same result as 'gcc -o foo foo.cpp -lstdc++': crash. > > > ...instead. There are a lot more things going on when using g++ other > > than adding -lstdc++. > > According to 'gcc -v' the only difference between `g++ -o foo foo.cpp' > and `gcc -o foo foo.cpp' is the two extra libraries `-lstdc++ -lm' at > link time... > > > If this works for you, then I suggest closing the bug. > > If it were that easy... > > As mentionned in the initial bug report, I found this with a much > bigger program that was crashing when throwing complex (instances of > derived classes) exceptions... This program was initially compiled and > linked with g++. This program does not need libstdc++. When I tried to > link it without (with gcc), it started working. > > Just adding '-lstdc++' makes exceptions handling buggy... The crash > happens during the throw()... I'm quite puzzled...
Interesting. It works perfectly fine for me under sparc (even with your command line). Of course, I am using a gcc-3.0 snapshot more recent than that in the archive. I'll be uploading a new snapshot within a day or two, so please give that a try. -- -----------=======-=-======-=========-----------=====------------=-=------ / Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \ ` [EMAIL PROTECTED] -- [EMAIL PROTECTED] -- [EMAIL PROTECTED] ' `---=========------=======-------------=-=-----=-===-======-------=--=---'