* Re: An g++ exception bug in egcs 970924
[not found] <m0xEHvZ-0004ecC.cygnus.egcs@ocean.lucon.org>
@ 1997-09-25 11:42 ` Jason Merrill
1997-09-25 14:16 ` H.J. Lu
0 siblings, 1 reply; 3+ messages in thread
From: Jason Merrill @ 1997-09-25 11:42 UTC (permalink / raw)
To: H.J. Lu; +Cc: egcs
Nested exceptions are not supported.
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: An g++ exception bug in egcs 970924
1997-09-25 11:42 ` An g++ exception bug in egcs 970924 Jason Merrill
@ 1997-09-25 14:16 ` H.J. Lu
0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 1997-09-25 14:16 UTC (permalink / raw)
To: Jason Merrill; +Cc: egcs
>
> Nested exceptions are not supported.
>
> Jason
>
Here is a real exception bug on x86.
# gcc -O des.cc -fno-exceptions
# a.out
# gcc -O des.cc
# a.out
zsh: 9138 segmentation fault ./a.out
There may be more bugs like that.
--
H.J. Lu (hjl@gnu.ai.mit.edu)
---
class Int
{
protected:
int rep;
public:
Int () :rep(0) {}
Int (const Int& b) :rep(b.Int::val()) {}
~Int();
operator int() const { return val(); }
int val() const { return rep; }
void operator = (const int b)
{ rep = b; }
void operator ++ ()
{ ++rep; }
};
Int::~Int() {}
void Proc0();
void Proc7(Int IntParI1, Int IntParI2, Int *IntParOut);
main()
{
Proc0();
exit(0);
}
void Proc0()
{
Int IntLoc1;
Int IntLoc2;
Int IntLoc3;
IntLoc1 = 2;
IntLoc2 = 3;
while (IntLoc1 < IntLoc2)
{
IntLoc3 = 5 * IntLoc1 - IntLoc2;
Proc7(IntLoc1, IntLoc2, &IntLoc3);
++IntLoc1;
}
}
void Proc7(Int IntParI1, Int IntParI2, Int *IntParOut)
{
Int IntLoc;
IntLoc = IntParI1 + 2;
*IntParOut = IntParI2 + IntLoc;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* An g++ exception bug in egcs 970924
@ 1997-09-25 10:42 H.J. Lu
0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 1997-09-25 10:42 UTC (permalink / raw)
To: egcs
egcs 970924 configured for linux/x86/libc 5.
# gcc g++.mike/eh35.C
# a.out
zsh: 6096 segmentation fault ./a.out
--
H.J. Lu (hjl@gnu.ai.mit.edu)
---g++.mike/eh35.C---
// Special g++ Options: -fexceptions
// excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*
main() {
try {
throw 'a';
} catch (char a) {
try {
throw 'a';
} catch (int i) {
return 1;
} catch (char c) {
return 0;
}
}
return 1;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1997-09-25 14:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <m0xEHvZ-0004ecC.cygnus.egcs@ocean.lucon.org>
1997-09-25 11:42 ` An g++ exception bug in egcs 970924 Jason Merrill
1997-09-25 14:16 ` H.J. Lu
1997-09-25 10:42 H.J. Lu
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).