From 830192fc350cc64d8360547865fc32e6a0026980 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sat, 3 Sep 2016 12:37:06 +0300 Subject: [PATCH 1/6] Detect [[noreturn]] attribute --- include/boost/config/suffix.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 17bf1020..cea466e5 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -624,6 +624,10 @@ namespace std{ using ::type_info; } # define BOOST_NORETURN __declspec(noreturn) # elif defined(__GNUC__) # define BOOST_NORETURN __attribute__ ((__noreturn__)) +# elif defined(__has_cpp_attribute) +# if __has_cpp_attribute(noreturn) +# define BOOST_NORETURN [[noreturn]] +# endif # else # define BOOST_NO_NORETURN # define BOOST_NORETURN From a17bb6c8da531a0a5cba18cfb1f4c4071fc051e9 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 4 Sep 2016 16:04:08 +0000 Subject: [PATCH 2/6] Update for Oracle 12.5, see issue #12425 --- include/boost/config/stdlib/libstdcpp3.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index a5efcb76..1d8f6ccb 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -151,8 +151,12 @@ // Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't // set __GNUC__ // +#if __SUNPRO_CC >= 0x5140 +#define BOOST_LIBSTDCXX_VERSION 50100 +#else #define BOOST_LIBSTDCXX_VERSION 40800 #endif +#endif #if !defined(BOOST_LIBSTDCXX_VERSION) # define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) @@ -259,7 +263,7 @@ // // Headers not present on Solaris with the Oracle compiler: -#if defined(__SUNPRO_CC) +#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140) #define BOOST_NO_CXX11_HDR_FUTURE #define BOOST_NO_CXX11_HDR_FORWARD_LIST #define BOOST_NO_CXX11_HDR_ATOMIC From c4de2d0013c6a14c774310936038d17183739679 Mon Sep 17 00:00:00 2001 From: akumta Date: Tue, 6 Sep 2016 10:13:11 -0700 Subject: [PATCH 3/6] Update sunpro_cc.hpp Update for ticket #11972 --- include/boost/config/compiler/sunpro_cc.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/config/compiler/sunpro_cc.hpp b/include/boost/config/compiler/sunpro_cc.hpp index c43767f2..8f07e0e9 100644 --- a/include/boost/config/compiler/sunpro_cc.hpp +++ b/include/boost/config/compiler/sunpro_cc.hpp @@ -170,6 +170,13 @@ #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif + +// Turn on threading support for Solaris 12. +// Ticket #11972 +#if (__SUNPRO_CC >= 0x5140) && defined(__SunOS_5_12) && !defined(BOOST_HAS_THREADS) +# define BOOST_HAS_THREADS +#endif + // // Version // From b4570226993810b55860fcde9a09ae2b484ae9be Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 9 Sep 2016 12:25:43 +0000 Subject: [PATCH 4/6] Workaround for broken __has_cpp_attribute in Oracle-12.5 compiler --- include/boost/config/suffix.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index cea466e5..7ee41551 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -624,7 +624,7 @@ namespace std{ using ::type_info; } # define BOOST_NORETURN __declspec(noreturn) # elif defined(__GNUC__) # define BOOST_NORETURN __attribute__ ((__noreturn__)) -# elif defined(__has_cpp_attribute) +# elif defined(__has_cpp_attribute) && !defined(__SUNPRO_CC) # if __has_cpp_attribute(noreturn) # define BOOST_NORETURN [[noreturn]] # endif From d4a4885ed9d0bde8eb29882735a497be9722cae1 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sat, 10 Sep 2016 19:45:41 +0300 Subject: [PATCH 5/6] Fix for undefined BOOST_NORETURN --- include/boost/config/suffix.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 7ee41551..3da09d9a 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -628,12 +628,14 @@ namespace std{ using ::type_info; } # if __has_cpp_attribute(noreturn) # define BOOST_NORETURN [[noreturn]] # endif -# else -# define BOOST_NO_NORETURN -# define BOOST_NORETURN # endif #endif +#if !defined(BOOST_NORETURN) +# define BOOST_NO_NORETURN +# define BOOST_NORETURN +#endif + // Branch prediction hints // These macros are intended to wrap conditional expressions that yield true or false // From 64780152fa4649078ded4c82e13df7bedeff7776 Mon Sep 17 00:00:00 2001 From: akumta Date: Sun, 11 Sep 2016 08:17:43 -0700 Subject: [PATCH 6/6] For Oracle Developer Studio __has_attribute to be used instead of __has_cpp_attribute, not remove the functionality. --- include/boost/config/suffix.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 3da09d9a..eeaec2bf 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -624,7 +624,11 @@ namespace std{ using ::type_info; } # define BOOST_NORETURN __declspec(noreturn) # elif defined(__GNUC__) # define BOOST_NORETURN __attribute__ ((__noreturn__)) -# elif defined(__has_cpp_attribute) && !defined(__SUNPRO_CC) +# elif defined(__has_attribute) && defined(__SUNPRO_CC) +# if __has_attribute(noreturn) +# define BOOST_NORETURN [[noreturn]] +# endif +# elif defined(__has_cpp_attribute) # if __has_cpp_attribute(noreturn) # define BOOST_NORETURN [[noreturn]] # endif