SEH & class with virtual method
Ales Pour
pour@princip.cz
Tue Aug 7 06:02:00 GMT 2001
Hello,
I ran into the following problem: if I have a class with virtual method
and use pthread_cleanup_push/pop() macros, compilation with VC++ 5.0
(SP3) fails with
'error C2712: Cannot use __try in functions that require object
unwinding'.
Here's the code:
#define PtW32NoCatchWarn
#include "pthread.h"
class X {
virtual void x() {}
};
extern "C" {
extern void *thread(void *);
extern void *code(void *);
}
void *
cleanup(void *arg)
{
return NULL;
}
void *
code(void *arg)
{
X *xa3 = new X();
pthread_cleanup_push(thread,NULL);
pthread_cleanup_pop(1);
return NULL;
}
int
main()
{
code(NULL);
return EXIT_SUCCESS;
}
Thank you!
__________________
Ales Pour
Princip a.s. Praha
Czech Republic
More information about the Pthreads-win32
mailing list