public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* std::exception_ptr on Cygwin
@ 2009-05-29  0:37 Piotr Wyderski
  2009-05-29  9:23 ` Andrew Pinski
  0 siblings, 1 reply; 4+ messages in thread
From: Piotr Wyderski @ 2009-05-29  0:37 UTC (permalink / raw)
  To: gcc

It is impossible to use std::exception_ptr and related
functionality on Cygwin in C++0x mode, despite the
fact the necessary classes seem to be implemented.
That is because in <exception> there is a conditional
block:

#if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
     && defined(_GLIBCXX_ATOMIC_BUILTINS_4))
#include <exception_ptr.h>
#endif

The macro __GXX_EXPERIMENTAL_CXX0X__ is
defined correctly, as expected, but

_GLIBCXX_ATOMIC_BUILTINS_4

is not, as Cygwin does not use glibc. Its underlying
processor architecture, however, supports the fullest
set of atomic primitives, so is there really a need to
make it glibc-dependent? If I enforce the macro
definition from the command line, then the exception_ptr
-dependent code compiles correctly (but does not link
because of

 undefined reference to `std::__exception_ptr::exception_ptr::~exception_ptr()

and the other non-inline members. I presume
it is not the recommended way.

Best regards
Piotr Wyderski

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-29  0:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-29  0:37 std::exception_ptr on Cygwin Piotr Wyderski
2009-05-29  9:23 ` Andrew Pinski
2009-05-29 10:07   ` Piotr Wyderski
2009-05-29 10:12     ` Dave Korn

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).