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]

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]