Skip to content

Conversation

@NWilson
Copy link
Member

@NWilson NWilson commented Oct 30, 2024

Using assert rather than abort will give a (very slightly) better error message, which includes the containing function name.

Only affects Debug builds.

@NWilson NWilson force-pushed the user/niwilson/assert-unreachable branch from fa7cc34 to 31b0988 Compare October 30, 2024 11:24
Copy link
Contributor

@carenas carenas left a comment

Choose a reason for hiding this comment

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

It would be probably nicer to refactor it slightly so there is only one #include <assert.h> though

@NWilson NWilson force-pushed the user/niwilson/assert-unreachable branch from 31b0988 to 9675951 Compare October 30, 2024 14:59
@NWilson
Copy link
Member Author

NWilson commented Oct 30, 2024

Good thinking. I pulled out the #include <assert.h> and moved it up a few lines.

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

@zherczeg
Copy link
Collaborator

@carenas is this patch ok now?

@carenas
Copy link
Contributor

carenas commented Oct 31, 2024

Yes, merge it please; @zherczeg

@zherczeg zherczeg merged commit ccb259f into PCRE2Project:master Oct 31, 2024
15 checks passed
@NWilson NWilson deleted the user/niwilson/assert-unreachable branch November 6, 2024 17:23
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.

3 participants