public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: Ales Pour <pour@princip.cz>
To: pthreads-win32@sourceware.cygnus.com
Subject: SEH & class with virtual method
Date: Tue, 07 Aug 2001 06:02:00 -0000	[thread overview]
Message-ID: <3B6FE700.5DBF97DF@princip.cz> (raw)

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

             reply	other threads:[~2001-08-07  6:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-07  6:02 Ales Pour [this message]
2001-08-07  6:54 ` Ales Pour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B6FE700.5DBF97DF@princip.cz \
    --to=pour@princip.cz \
    --cc=pthreads-win32@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).