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

Avoid spurious signed/unsigned comparison warnings #1205

Merged
merged 1 commit into from
Aug 4, 2017

Conversation

tautschnig
Copy link
Collaborator

Follow-up to 260e03d: all comparisons are guarded by checks that the
signed integer is >= 0, thus casts to unsigned are safe.

Copy link
Member

@peterschrammel peterschrammel left a comment

Choose a reason for hiding this comment

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

@tautschnig, what do negative values of depth_limit, context_bound, etc mean? Could they be made unsigned?

@tautschnig
Copy link
Collaborator Author

Negative values mean "limit not set"; as briefly discussed on #151 a bound of "0" actually makes sense, and thus can't be used to mark limit-not-set.

@peterschrammel
Copy link
Member

What's the difference between 'limit not set' and std::numeric_limits<size_t>::max()?

Follow-up to 260e03d: instead of using negative numbers to represent
"limit not set", use the maximum value as default.
@tautschnig
Copy link
Collaborator Author

@peterschrammel A very valid question ... - I've changed the implementation to follow your suggestion instead.

@kroening kroening merged commit 652ea09 into diffblue:master Aug 4, 2017
@tautschnig tautschnig deleted the sign-compare-fix branch August 4, 2017 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants