From 56ae4311bb9093e47580adcedafc6dff47e53e62 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Tue, 5 Oct 2010 15:04:50 +0000 Subject: [PATCH] default gcc visibility for exception types, static requirement in test Jamfile. [SVN r65763] --- include/boost/exception/detail/exception_ptr.hpp | 12 ++++++++++++ include/boost/exception/exception.hpp | 10 ++++++++++ test/Jamfile.v2 | 1 + 3 files changed, 23 insertions(+) diff --git a/include/boost/exception/detail/exception_ptr.hpp b/include/boost/exception/detail/exception_ptr.hpp index 2eab7de..74f451c 100644 --- a/include/boost/exception/detail/exception_ptr.hpp +++ b/include/boost/exception/detail/exception_ptr.hpp @@ -68,6 +68,7 @@ boost boost::exception, std::bad_alloc { + ~bad_alloc_() throw() { } }; struct @@ -75,6 +76,7 @@ boost boost::exception, std::bad_exception { + ~bad_exception_() throw() { } }; template @@ -104,6 +106,11 @@ boost e = get_static_exception_object(); } +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif class unknown_exception: public boost::exception, @@ -143,6 +150,11 @@ boost #endif } }; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif namespace exception_detail diff --git a/include/boost/exception/exception.hpp b/include/boost/exception/exception.hpp index b6648b7..db213e3 100644 --- a/include/boost/exception/exception.hpp +++ b/include/boost/exception/exception.hpp @@ -189,6 +189,11 @@ boost E const & set_info( E const &, throw_line const & ); } +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility push (default) +# endif +#endif class exception { @@ -251,6 +256,11 @@ boost mutable char const * throw_file_; mutable int throw_line_; }; +#if defined(__GNUC__) +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# pragma GCC visibility pop +# endif +#endif inline exception:: diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 59660c7..b989171 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -9,6 +9,7 @@ import testing ; project : requirements + static on /boost//exception BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR