Opened 7 years ago
Closed 7 years ago
#11661 closed Feature Requests (fixed)
BOOST_NO_UNREACHABLE_RETURN_DETECTION to use __builtin_unreachable()
Reported by: | akrzemi1 | Owned by: | John Maddock |
---|---|---|---|
Milestone: | To Be Determined | Component: | config |
Version: | Boost 1.59.0 | Severity: | Optimization |
Keywords: | Cc: |
Description
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
Note:
See TracTickets
for help on using tickets.
Fixed in https://github.com/boostorg/config/commit/a17884f425f14fbaba88a14410a8332f4ed04e57