Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not call abort in forced_return #63

Merged
merged 1 commit into from Apr 12, 2019

Conversation

@Kojoley
Copy link
Contributor

commented Mar 26, 2019

Reduces code bloating on Clang and MSVC, saves a branch on GCC.
The noreturn warnings have also been tested on https://godbolt.org/z/T5gmlV

ref #60 (comment).

Do not call abort in forced_return
Reduces code bloating on Clang and MSVC, saves a branch on GCC.
@coveralls

This comment has been minimized.

Copy link

commented Mar 26, 2019

Coverage Status

Coverage remained the same at 95.063% when pulling 0388c76 on Kojoley:do-not-call-abort into 7ecf721 on boostorg:develop.

@apolukhin

This comment has been minimized.

Copy link
Member

commented Mar 26, 2019

MSVC is unhappy. Looks as an issue in Boost.Config.

@pdimov

This comment has been minimized.

Copy link

commented Mar 26, 2019

Easiest would be something like

#if defined(__GNUC__)
__builtin_unreachable();
#elif defined(_MSC_VER)
__assume(false);
#else
std::abort();
#endif

@Kojoley Kojoley force-pushed the Kojoley:do-not-call-abort branch 2 times, most recently from 0388c76 to 3cc73fe Mar 26, 2019

@apolukhin apolukhin merged commit 7cc18f3 into boostorg:develop Apr 12, 2019

4 checks passed

Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 95.063%
Details

@Kojoley Kojoley deleted the Kojoley:do-not-call-abort branch Apr 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.