This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
exception handling bug?
- To: egcs at cygnus dot com
- Subject: exception handling bug?
- From: Marc Lehmann <pcg at goof dot com>
- Date: Sat, 22 Nov 1997 19:52:02 +0100
this program:
struct E {
int x;
E(int i) { x = i; };
};
int main()
{
try {
E *p = new E(5);
throw p;
}
catch (E *&e) {
printf ("address of e is %d\n", (long)e);
}
}
prints "address of e is 5" instead of the *address* of e. I'm
no exception expert, but IMHO this should print the contents of "p"
instead.
-----==-
----==-- _
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / pcg@goof.com
-=====/_/_//_/\_,_/ /_/\_\
The choice of a GNU generation