Message ID | 4DDA730D.1040602@redhat.com |
---|---|
State | New |
Headers | show |
On 05/23/2011 04:45 PM, Jason Merrill wrote: > While looking at c++/47263 I noticed that eh_ptr.cc doesn't compile in > C++0x mode because __safe_bool isn't defined, but is used. Is this > the way you'd like to fix that? Jason, the change by itself seems indeed ok, but really I don't think we should tell the people that building all the *.cc files with either c++03 or c++0x is ok, because we have subtle ABI issues here, in the exports. Thus, if the abi test passes (in both modes), I have no objections of course, but I still think we should not consider the tweak as telling to Vincenzo (in libstdc++/48811): go ahead, build all the *.cc with whatever -std= you want and everything will work fine. Paolo.
commit e018fa18d85e6974b3d66a12c5b7ae9f77b76683 Author: Jason Merrill <jason@redhat.com> Date: Sun May 22 16:31:20 2011 -0400 * libsupc++/exception_ptr.h: Fix compilation in C++0x mode. diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h index 26117cd..00b30fd 100644 --- a/libstdc++-v3/libsupc++/exception_ptr.h +++ b/libstdc++-v3/libsupc++/exception_ptr.h @@ -97,7 +97,9 @@ namespace std exception_ptr(exception_ptr&& __o) throw() : _M_exception_object(__o._M_exception_object) { __o._M_exception_object = 0; } -#else +#endif + +#if !defined (__GXX_EXPERIMENTAL_CXX0X__) || defined (_GLIBCXX_EH_PTR_COMPAT) typedef void (exception_ptr::*__safe_bool)(); // For construction from nullptr or 0.