linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] catch non-sign-extended '~' brainos
@ 2014-06-09 11:57 Phil Carmody
  2014-06-09 11:58 ` [PATCH 1/3] sparse: Just use simple ints for decision variables Phil Carmody
  2014-06-10  7:54 ` [PATCHv2 0/3] catch non-sign-extended '~' brainos Phil Carmody
  0 siblings, 2 replies; 21+ messages in thread
From: Phil Carmody @ 2014-06-09 11:57 UTC (permalink / raw)
  To: sparse; +Cc: linux-sparse, phil

Chris, fellow sparsers,

Bitwise-not is often used to create masks. Unfortunately implicit conversions
to longer types may leave the recipient with fewer set bit than he expected,
if he started with an unsigned type. It's nice to warn that such constructs
are dubious.

The guts for the fix are in patch 2. I'm not sure this is the right location
for the fix, but the prior logical-not checks are quite closely related, so
I bundled them in together.

As an aside - while sniffing around that file, I came across a lot of helpers
who could have their pointer parameters made const - is there any interest in
some const clean-up, or is that unwanted comma-fudging?

Cheers,
Phil


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2014-07-02  9:28 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-09 11:57 [PATCH 0/3] catch non-sign-extended '~' brainos Phil Carmody
2014-06-09 11:58 ` [PATCH 1/3] sparse: Just use simple ints for decision variables Phil Carmody
2014-06-09 11:58   ` [PATCH 2/3] sparse: detect non-sign-extended masks created by '~' Phil Carmody
2014-06-09 11:58     ` [PATCH 3/3] validation: dubious bitwise operations with nots Phil Carmody
2014-06-09 13:36       ` Josh Triplett
2014-06-09 13:34     ` [PATCH 2/3] sparse: detect non-sign-extended masks created by '~' Josh Triplett
2014-06-09 16:05       ` Phil Carmody
2014-06-09 13:27   ` [PATCH 1/3] sparse: Just use simple ints for decision variables Josh Triplett
2014-06-10  7:54 ` [PATCHv2 0/3] catch non-sign-extended '~' brainos Phil Carmody
2014-06-10  7:54   ` [PATCHv2 1/3] sparse: Just use simple ints for decision variables Phil Carmody
2014-06-10  7:54     ` [PATCHv2 2/3] sparse: detect non-sign-extended masks created by '~' Phil Carmody
2014-06-10  7:54       ` [PATCHv2 3/3] validation: dubious bitwise operations with bitwise nots Phil Carmody
2014-06-27 11:19   ` [PATCHv2 0/3] catch non-sign-extended '~' brainos Phil Carmody
2014-06-27 17:16     ` Christopher Li
2014-06-30  8:56       ` Phil Carmody
     [not found]         ` <CANeU7Q=Z=Xac_T3JRAyqo_fF4LAKD-MM41NYz+nDstDutcVUfA@mail.gmail.com>
2014-06-30 17:27           ` Christopher Li
2014-07-01 11:30           ` Phil Carmody
2014-07-01 19:42             ` Christopher Li
2014-07-02  7:43               ` Phil Carmody
2014-07-02  8:51                 ` Christopher Li
2014-07-02  9:28                   ` Phil Carmody

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).