precedence: complain about "foo << bar - baz"
commit93561a28b91c00d70ec92f28fdcc7c7c83625bcd
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 5 Mar 2015 12:50:07 +0000 (5 15:50 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 5 Mar 2015 12:50:07 +0000 (5 15:50 +0300)
tree7d6ed2399a7b183f622d32c15705b5e5618b6d66
parent4fd9a05e133d9732ade71ed43bb235c229dacc52
precedence: complain about "foo << bar - baz"

The negate operation has higher precedence then the shift so
"foo << bar - baz" can be re-written as "foo << (bar - baz)".  When you see
these in the code, it's normally a bug.  There are some macros like
Dbl_right_align() in parisc where people use "foo << bar - baz" and it's
not a bug, but that's ugly code so I don't feel bad complaining about it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_precedence.c