Add return statements in noreturn functions#129
Merged
michael-schwarz merged 1 commit intogoblint:developfrom Feb 1, 2023
Merged
Add return statements in noreturn functions#129michael-schwarz merged 1 commit intogoblint:developfrom
return statements in noreturn functions#129michael-schwarz merged 1 commit intogoblint:developfrom
Conversation
(option to) add always add return statements in functions that fall through, specifically those marked noreturn
michael-schwarz
approved these changes
Jan 26, 2023
Member
michael-schwarz
left a comment
There was a problem hiding this comment.
Looks reasonable, thank you for the PR!
sim642
approved these changes
Jan 26, 2023
Member
|
@just-max: any reason this is still marked as a draft? |
Author
|
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.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in 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. Fornoreturnfunctions, however, it trusts that these functions never reach their end. This makes the behaviour arguably more consistent between functions markednoreturnand functions that are not.Fixes goblint/analyzer#951. Fixes the issue blocking goblint/analyzer#953. See also goblint/analyzer#953 (comment).