forked from cil-project/cil
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add return
statements in noreturn
functions
#129
Merged
michael-schwarz
merged 1 commit into
goblint:develop
from
just-max:add-return-on-noreturn-fallthrough
Feb 1, 2023
Merged
Add return
statements in noreturn
functions
#129
michael-schwarz
merged 1 commit into
goblint:develop
from
just-max:add-return-on-noreturn-fallthrough
Feb 1, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(option to) add always add return statements in functions that fall through, specifically those marked noreturn
michael-schwarz
approved these changes
Jan 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, thank you for the PR!
sim642
approved these changes
Jan 26, 2023
@just-max: any reason this is still marked as a draft? |
I haven't gotten around to testing the changes yet, especially how they interact with the changes in Goblint, so I'd wait for that before merging here. |
sim642
added a commit
to sim642/opam-repository
that referenced
this pull request
Sep 11, 2023
CHANGES: * Rename `Rmtmps` to `RmUnused` (goblint/cil#135). * Add option to add return statement to `noreturn` functions (goblint/cil#129). * Fix empty `if`s being removed (goblint/cil#140). * Fix `_Float128` support (goblint/cil#118, goblint/cil#119). * Fix C11 `_Alignas` computation (goblint/cil#130). * Fix renaming and merging of `inline` functions based on C standard (goblint/cil#120, goblint/cil#124). * Fix `Pretty` not resetting all global state between calls (goblint/cil#133, goblint/cil#134). * Fix `fundec` location in merger (goblint/cil#139). * Fix `cilly` patcher (goblint/cil#128). * Disable basename by default in parser.
nberth
pushed a commit
to nberth/opam-repository
that referenced
this pull request
Jun 18, 2024
CHANGES: * Rename `Rmtmps` to `RmUnused` (goblint/cil#135). * Add option to add return statement to `noreturn` functions (goblint/cil#129). * Fix empty `if`s being removed (goblint/cil#140). * Fix `_Float128` support (goblint/cil#118, goblint/cil#119). * Fix C11 `_Alignas` computation (goblint/cil#130). * Fix renaming and merging of `inline` functions based on C standard (goblint/cil#120, goblint/cil#124). * Fix `Pretty` not resetting all global state between calls (goblint/cil#133, goblint/cil#134). * Fix `fundec` location in merger (goblint/cil#139). * Fix `cilly` patcher (goblint/cil#128). * Disable basename by default in parser.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(Option to) add always add return statements in functions that fall through, specifically those marked
noreturn
. The justification for adding this change to CIL: currently CIL always adds a return statement if it is at all possible for the function to reach the end of its body. Fornoreturn
functions, however, it trusts that these functions never reach their end. This makes the behaviour arguably more consistent between functions markednoreturn
and functions that are not.Fixes goblint/analyzer#951. Fixes the issue blocking goblint/analyzer#953. See also goblint/analyzer#953 (comment).