This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
called,"__cxa_begin_catch" isFrom: Andrew Haley <aph@redhat.com> To: 王 刚伟 <gwwang10@hotmail.com> CC: gcc-help@gcc.gnu.org Subject: Re: gcc exception handle Date: Mon, 29 Jan 2007 11:11:36 +0000
?瞻 writes:
> Hi,
>
> Here is My test function :
>
> class A
> {
> public:
> private:
> char string[SIZE];
> };
>
> void test1(void)
> {
> A obj;
>
> try
> {
> throw obj;
> }
> catch (A &e)
> {
> printf("exception ! \n");
> }
> }
>
> when SIZE <= 68,"__cxa_allocate_exception" allocates space for the
> exception successfully,after "__cxa_throw" is
> called,and the statement "printf..." in the catch block can beexecuted.
> when SIZE > 68, ,"__cxa_allocate_exception" also allocates space forthe
> exception successfully,but after "__cxz_throw" iscalled,"__cxa_end_catch"
> is called,and the program crashed.
Works for me. What arch, what compiler version, etc.
Andrew.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |