Subject: [Boost-bugs] [Boost C++ Libraries] #11661: BOOST_NO_UNREACHABLE_RETURN_DETECTION to use __builtin_unreachable()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-09-16 15:08:03
#11661: BOOST_NO_UNREACHABLE_RETURN_DETECTION to use __builtin_unreachable()
------------------------------+--------------------------
Reporter: akrzemi1 | Owner: johnmaddock
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: config
Version: Boost 1.59.0 | Severity: Optimization
Keywords: |
------------------------------+--------------------------
Macro BOOST_NO_UNREACHABLE_RETURN_DETECTION is now defined as:
{{{
#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
# define BOOST_UNREACHABLE_RETURN(x) return x;
#else
# define BOOST_UNREACHABLE_RETURN(x)
#endif
}}}
In order to take the full advantage of the compiler widgets, I think it
could be changed to:
{{{
#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
# define BOOST_UNREACHABLE_RETURN(x) return x;
#else if __HAS_BUILTIN_UNREACHABLE
# define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable()
#else
# define BOOST_UNREACHABLE_RETURN(x)
#endif
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11661> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC