This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Followup -- Re: #define catch?


Well, after doing some more research, it appears that it *is* legal in C++
to have multiple catch blocks for the same exception, so apparently this is
yet another VC++ bug.

----- Original Message -----
From: "Scott McCaskill" <scott@3dfx.com>
To: <pthreads-win32@sourceware.cygnus.com>
Sent: Wednesday, August 02, 2000 11:49 AM
Subject: Re: #define catch?


>
> ----- Original Message -----
> From: "Bossom, John" <John.Bossom@Cognos.COM>
> To: "'Ross Johnson'" <rpj@ise.canberra.edu.au>; "Scott McCaskill"
> <scott@3dfx.com>
> Cc: <pthreads-win32@sourceware.cygnus.com>
> Sent: Wednesday, August 02, 2000 10:42 AM
> Subject: RE: #define catch?
>
>
> > "catch" is actually a keyword in C++...
> >
>
> This is true.. but I don't see what you're getting at.  The fundamental
> problem I encountered is that this (legal) code:
>
> catch ( app_exception ) { }
> catch ( some_other_app_exception ) { }
>
> ..will be expanded to the following when using the macro in pthread.h:
>
> catch ( Pthread_exception_cancel ) { throw; }
> catch ( Pthread_exception_exit ) { throw; }
> catch ( app_exception ) { }
> catch ( Pthread_exception_cancel ) { throw; }
> catch ( Pthread_exception_exit ) { throw; }
> catch ( some_other_app_exception ) { }
>
> ..and VC++ will not compile that because of the existence of multiple
> handlers for Pthread_exception_cancel and Pthread_exception_exit.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]