From d5aaa3801aa40c83b14ce980c077da79a8ced578 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 6 Apr 2015 12:48:06 +0300 Subject: [PATCH 1/4] Revert "fix a couple of gcc warnings" This reverts commit 79e73a715c0a323404cdc5f29e2f25dd573473b7. --- include/boost/archive/iterators/transform_width.hpp | 3 +-- include/boost/serialization/variant.hpp | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/archive/iterators/transform_width.hpp b/include/boost/archive/iterators/transform_width.hpp index 1c304c04..15dd8dfc 100644 --- a/include/boost/archive/iterators/transform_width.hpp +++ b/include/boost/archive/iterators/transform_width.hpp @@ -113,11 +113,10 @@ public: transform_width(BOOST_PFTO_WRAPPER(T) start) : super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))), m_buffer_out_full(false), - m_buffer_out(), // To disable GCC warning, but not truly necessary //(m_buffer_in will be initialized later before being //used because m_remaining_bits == 0) - m_buffer_in(), + m_buffer_in(0), m_remaining_bits(0), m_end_of_sequence(false) {} diff --git a/include/boost/serialization/variant.hpp b/include/boost/serialization/variant.hpp index dce6f3d4..70e395e2 100644 --- a/include/boost/serialization/variant.hpp +++ b/include/boost/serialization/variant.hpp @@ -66,6 +66,7 @@ void save( ){ int which = v.which(); ar << BOOST_SERIALIZATION_NVP(which); + typedef typename boost::variant::types types; variant_save_visitor visitor(ar); v.apply_visitor(visitor); } From 57da005e5f9a3138e6709427cc7c452639bfc09f Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 6 Apr 2015 12:48:20 +0300 Subject: [PATCH 2/4] Revert "add BOOST_SYMBOL_VISIBLE to otherwise invisible classes and implement BOOST_NOEXCEPT where needed" This reverts commit e7a7ee8018c5eebbaeaadd9ae519ede638d18b45. --- include/boost/archive/archive_exception.hpp | 10 +++++----- include/boost/archive/codecvt_null.hpp | 2 +- .../boost/serialization/detail/shared_count_132.hpp | 2 +- src/archive_exception.cpp | 11 ++++++----- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/include/boost/archive/archive_exception.hpp b/include/boost/archive/archive_exception.hpp index 889ba9d7..ffb430c6 100644 --- a/include/boost/archive/archive_exception.hpp +++ b/include/boost/archive/archive_exception.hpp @@ -40,7 +40,7 @@ namespace archive { ////////////////////////////////////////////////////////////////////// // exceptions thrown by archives // -class BOOST_SYMBOL_VISIBLE archive_exception : +class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) archive_exception : public virtual std::exception { protected: @@ -82,13 +82,13 @@ public: exception_code c, const char * e1 = NULL, const char * e2 = NULL - ) BOOST_NOEXCEPT; - virtual ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ; - virtual const char *what() const BOOST_NOEXCEPT_OR_NOTHROW ; + ); + virtual ~archive_exception() throw(); + virtual const char *what() const throw(); protected: unsigned int append(unsigned int l, const char * a); - archive_exception() BOOST_NOEXCEPT; + archive_exception(); }; }// namespace archive diff --git a/include/boost/archive/codecvt_null.hpp b/include/boost/archive/codecvt_null.hpp index 4668c435..75387a97 100644 --- a/include/boost/archive/codecvt_null.hpp +++ b/include/boost/archive/codecvt_null.hpp @@ -49,7 +49,7 @@ class codecvt_null; template<> class codecvt_null : public std::codecvt { - virtual bool do_always_noconv() const BOOST_NOEXCEPT_OR_NOTHROW { + virtual bool do_always_noconv() const throw() { return true; } public: diff --git a/include/boost/serialization/detail/shared_count_132.hpp b/include/boost/serialization/detail/shared_count_132.hpp index 0bba312c..a63e4884 100644 --- a/include/boost/serialization/detail/shared_count_132.hpp +++ b/include/boost/serialization/detail/shared_count_132.hpp @@ -79,7 +79,7 @@ class bad_weak_ptr: public std::exception { public: - virtual char const * what() const BOOST_NOEXCEPT_OR_NOTHROW + virtual char const * what() const throw() { return "boost::bad_weak_ptr"; } diff --git a/src/archive_exception.cpp b/src/archive_exception.cpp index 368f0376..d06303f6 100644 --- a/src/archive_exception.cpp +++ b/src/archive_exception.cpp @@ -39,7 +39,7 @@ archive_exception::archive_exception( exception_code c, const char * e1, const char * e2 -) BOOST_NOEXCEPT : +) : code(c) { unsigned int length = 0; @@ -111,15 +111,16 @@ archive_exception::archive_exception( } } BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) -archive_exception::~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW {} +archive_exception::~archive_exception() throw() {} BOOST_ARCHIVE_DECL(const char *) -archive_exception::what( ) const BOOST_NOEXCEPT_OR_NOTHROW { +archive_exception::what( ) const throw() +{ return m_buffer; } BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) -archive_exception::archive_exception() BOOST_NOEXCEPT : - code(no_exception) +archive_exception::archive_exception() : + code(no_exception) {} } // archive From e525cb560f69f591d44a6644f5c76c8a01fea2da Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 6 Apr 2015 12:48:22 +0300 Subject: [PATCH 3/4] Revert "simplified visibility" This reverts commit 4c0590737e5988f1c97d07ff8c4aa0d33cb19316. --- include/boost/archive/detail/decl.hpp | 48 +++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/include/boost/archive/detail/decl.hpp b/include/boost/archive/detail/decl.hpp index d0181400..cf0071cb 100644 --- a/include/boost/archive/detail/decl.hpp +++ b/include/boost/archive/detail/decl.hpp @@ -27,19 +27,53 @@ #if defined(BOOST_HAS_DECLSPEC) #if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)) #if defined(BOOST_ARCHIVE_SOURCE) - #define BOOST_ARCHIVE_DECL(T) BOOST_SYMBOL_EXPORT T - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) BOOST_SYMBOL_EXPORT T + #if defined(__BORLANDC__) + #define BOOST_ARCHIVE_DECL(T) T __export + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __export + #elif defined(BOOST_GCC) && BOOST_GCC >= 4 + #define BOOST_ARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) + #else + #define BOOST_ARCHIVE_DECL(T) __declspec(dllexport) T + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllexport) T + #endif #else - #define BOOST_ARCHIVE_DECL(T) BOOST_SYMBOL_IMPORT T + #if defined(__BORLANDC__) + #define BOOST_ARCHIVE_DECL(T) T __import + #elif defined(BOOST_GCC) && BOOST_GCC >= 4 + #define BOOST_ARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) + #else + #define BOOST_ARCHIVE_DECL(T) __declspec(dllimport) T + #endif #endif #if defined(BOOST_WARCHIVE_SOURCE) - #define BOOST_WARCHIVE_DECL(T) BOOST_SYMBOL_EXPORT T - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) BOOST_SYMBOL_EXPORT T + #if defined(__BORLANDC__) + #define BOOST_WARCHIVE_DECL(T) T __export + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __export + #elif defined(BOOST_GCC) && BOOST_GCC >= 4 + #define BOOST_WARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) + #else + #define BOOST_WARCHIVE_DECL(T) __declspec(dllexport) T + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllexport) T + #endif #else - #define BOOST_WARCHIVE_DECL(T) BOOST_SYMBOL_IMPORT T + #if defined(__BORLANDC__) + #define BOOST_WARCHIVE_DECL(T) T __import + #elif defined(BOOST_GCC) && BOOST_GCC >= 4 + #define BOOST_WARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) + #else + #define BOOST_WARCHIVE_DECL(T) __declspec(dllimport) T + #endif #endif #if !defined(BOOST_WARCHIVE_SOURCE) && !defined(BOOST_ARCHIVE_SOURCE) - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) BOOST_SYMBOL_IMPORT T + #if defined(__BORLANDC__) + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __import + #else + #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllimport) T + #endif #endif #endif #endif // BOOST_HAS_DECLSPEC From ee3560ad83dc702907f0deda830501ef38dd3544 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 6 Apr 2015 12:48:24 +0300 Subject: [PATCH 4/4] Revert "first cut in fixing up visibility" This reverts commit 94dbfcfc4f76c76216786792f6ed5380eb01017f. --- include/boost/archive/detail/decl.hpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/include/boost/archive/detail/decl.hpp b/include/boost/archive/detail/decl.hpp index cf0071cb..44e22be9 100644 --- a/include/boost/archive/detail/decl.hpp +++ b/include/boost/archive/detail/decl.hpp @@ -30,9 +30,6 @@ #if defined(__BORLANDC__) #define BOOST_ARCHIVE_DECL(T) T __export #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __export - #elif defined(BOOST_GCC) && BOOST_GCC >= 4 - #define BOOST_ARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) #else #define BOOST_ARCHIVE_DECL(T) __declspec(dllexport) T #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllexport) T @@ -40,9 +37,6 @@ #else #if defined(__BORLANDC__) #define BOOST_ARCHIVE_DECL(T) T __import - #elif defined(BOOST_GCC) && BOOST_GCC >= 4 - #define BOOST_ARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) #else #define BOOST_ARCHIVE_DECL(T) __declspec(dllimport) T #endif @@ -51,9 +45,6 @@ #if defined(__BORLANDC__) #define BOOST_WARCHIVE_DECL(T) T __export #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __export - #elif defined(BOOST_GCC) && BOOST_GCC >= 4 - #define BOOST_WARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) #else #define BOOST_WARCHIVE_DECL(T) __declspec(dllexport) T #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllexport) T @@ -61,9 +52,6 @@ #else #if defined(__BORLANDC__) #define BOOST_WARCHIVE_DECL(T) T __import - #elif defined(BOOST_GCC) && BOOST_GCC >= 4 - #define BOOST_WARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __attribute__ ((visibility ("default"))) #else #define BOOST_WARCHIVE_DECL(T) __declspec(dllimport) T #endif