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 use __builtin_unreachable() in PCRE2_ASSERT() #485

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carenas
Copy link
Contributor

@carenas carenas commented Sep 20, 2024

Simplify PCRE2_ASSERT() and while at it remove no longer needed dependency on __builtin_expect()

Fixes: #484

__builting_unreachable() implementation is not defined and has
been known to not trigger failures under some compilers.

Default instead to using assert(), which has the added benefit
of printing a descriptive message and it is also likely more
portable as it is part of ANSI C.
Copy link
Collaborator

@zherczeg zherczeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make PCRE2_ASSERT work
2 participants