(Serious) sparc/solaris EH problem
Teemu Torma
tot@trema.com
Fri Nov 28 03:59:00 GMT 1997
I think the following problem should be corrected before the release.
If compiled with -O, i is not zero as one would expect. The problem
does not happen if using sjlj exceptions, or if not optimizing.
I suspect that the register gets lost somehow.
$ c++ -O eh.cc
$ ./a.out
1: i = 0
2: i = 1
3: i = 1
Teemu
--------------------------------------------------------------------
#include <stdio.h>
int bar ()
{
throw 100;
}
main ()
{
int i = 0;
try
{
printf ("1: i = %d\n", i);
i = bar ();
}
catch (...)
{
printf ("2: i = %d\n", i);
}
printf ("3: i = %d\n", i);
return i;
}
---------------------------------------------------------------------------
More information about the Gcc
mailing list