From abec03383feca7abada6e8e6053b8d1cc1929de3 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Tue, 27 Mar 2012 19:31:48 +0000 Subject: [PATCH] Merging minor tested bugfixes from trunk. [SVN r77592] --- .../exception/detail/attribute_noreturn.hpp | 2 +- include/boost/exception/exception.hpp | 31 +++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/include/boost/exception/detail/attribute_noreturn.hpp b/include/boost/exception/detail/attribute_noreturn.hpp index f6a0b59..ae9f031 100644 --- a/include/boost/exception/detail/attribute_noreturn.hpp +++ b/include/boost/exception/detail/attribute_noreturn.hpp @@ -9,7 +9,7 @@ #if defined(_MSC_VER) #define BOOST_ATTRIBUTE_NORETURN __declspec(noreturn) #elif defined(__GNUC__) -#define BOOST_ATTRIBUTE_NORETURN __attribute__((noreturn)) +#define BOOST_ATTRIBUTE_NORETURN __attribute__((__noreturn__)) #else #define BOOST_ATTRIBUTE_NORETURN #endif diff --git a/include/boost/exception/exception.hpp b/include/boost/exception/exception.hpp index 9cdfd5c..42d2787 100644 --- a/include/boost/exception/exception.hpp +++ b/include/boost/exception/exception.hpp @@ -310,6 +310,11 @@ boost namespace exception_detail { +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif template struct error_info_injector: @@ -326,6 +331,11 @@ boost { } }; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif struct large_size { char c[256]; }; large_size dispatch_boost_exception( exception const * ); @@ -373,6 +383,11 @@ boost namespace exception_detail { +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif class clone_base { @@ -386,6 +401,11 @@ boost { } }; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif inline void @@ -410,8 +430,15 @@ boost class clone_impl: public T, - public clone_base + public virtual clone_base { + struct clone_tag { }; + clone_impl( clone_impl const & x, clone_tag ): + T(x) + { + copy_boost_exception(this,&x); + } + public: explicit @@ -430,7 +457,7 @@ boost clone_base const * clone() const { - return new clone_impl(*this); + return new clone_impl(*this,clone_tag()); } void