Fix shifts-assigns and avoid warns on deadcode
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | shift-assign: add more testcases for bogus linearizationvalidation/ validation/ | +374 | 0 replies | |
| 2/4 | shift-assign: fix linearization of shift-assignevaluate.c validation/ validation/ +1 more | +13 | 0 replies | |
| 3/4 | shift-assign: restrict shift count to unsigned intevaluate.c validation/ | +5 | 0 replies | |
| 4/4 | bad-shift: wait dead code elimination to warn about bad shiftsexpand.c linearize.c simplify.c +5 more | +78 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] Fix shifts-assigns and avoid warns on deadcode
Sparse warns shifts by a negative or oversized amount but it does this even on code that will not be executed. It's annoying because such warnings are given for generic macros.
The strategy for these warnings is changed in patch 4:
they are delayed until after the elimination of deadcode. This uncovered a bug in the type evaluation and the linearization of shift-assigns which is now solved in patch 2 & 3.
Thanks to Stafford Horne to bring this back to my attention.
This series is available for testing & review at:
git://git.kernel.org/pub/scm/devel/sparse/sparse.git bad-shift-equal
Luc Van Oostenryck (4):
shift-assign: add more testcases for bogus linearization
shift-assign: fix linearization of shift-assign
shift-assign: restrict shift count to unsigned int
bad-shift: wait dead code elimination to warn about bad shifts
evaluate.c | 11 +- expand.c | 18 -- linearize.c | 44 ++++ simplify.c | 20 +- validation/expand/bad-shift.c | 8 +- validation/linear/bug-assign-op0.c | 1 - validation/linear/shift-assign1.c | 319 +++++++++++++++++++++++++++++ validation/linear/shift-assign2.c | 53 +++++ validation/optim/shift-big.c | 12 +- validation/shift-negative.c | 4 +- validation/shift-undef-long.c | 7 +- validation/shift-undef.c | 52 ++--- 12 files changed, 462 insertions(+), 87 deletions(-) create mode 100644 validation/linear/shift-assign1.c create mode 100644 validation/linear/shift-assign2.c
base-commit: 4c6cbe557c48205f9b3d2aae4c166cd66446b240
Signature · 1 line
2.28.0