Messages in this thread | | | Date | Tue, 29 Jan 2013 19:38:19 +0100 (CET) | From | Julia Lawall <> | Subject | Re: coccinelle and bitmask arithmetic (was: Re: [patch] TTY: synclink, small cleanup in dtr_rts()) |
| |
The following rule looks promising:
@r@ constant c; identifier i; expression e; @@
( e | c@i | e & c@i | e |= c@i | e &= c@i )
@@ constant r.c,c1; identifier i1; expression e; @@
*c1@i1 + c
That is, the sum of two constants where at least one of them has been used with & or |.
julia
| |