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

Manual: Document pitfalls of specifying code with bools #1899

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

RyanGlScott
Copy link
Contributor

While the C bool type usually corresponds to llvm_int 1, there are some corner cases where it instead corresponds to llvm_int 8, which can cause your specifications to fail if you are not careful. This has tripped up multiple people in the past, and while it is difficult to catch this sort of mistake in general, we can at least warn about it in the SAW manual, which this patch accomplishes.

Copy link
Contributor

@bboston7 bboston7 left a comment

Choose a reason for hiding this comment

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

Looks good! Could you please also rebuild doc/manual/manual.pdf to include this change?

While the C `bool` type usually corresponds to `llvm_int 1`, there are some
corner cases where it instead corresponds to `llvm_int 8`, which can cause your
specifications to fail if you are not careful. This has tripped up multiple
people in the past, and while it is difficult to catch this sort of mistake in
general, we can at least warn about it in the SAW manual, which this patch
accomplishes.
@RyanGlScott
Copy link
Contributor Author

TIL that there is a PDF version of the SAW manual. (I wonder what it's used for.) I've regenerated it.

@RyanGlScott RyanGlScott added the ready-to-merge If at least one person approves this PR, automatically merge it when CI finishes successfully. label Aug 4, 2023
@mergify mergify bot merged commit 92afb5d into master Aug 4, 2023
38 checks passed
@mergify mergify bot deleted the document-bool-pitfalls branch August 4, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge If at least one person approves this PR, automatically merge it when CI finishes successfully.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants