Adam D. Ruppe <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #3 from Adam D. Ruppe <> 2010-04-10 
20:32:33 PDT ---
Yeah, when it bit me today, I wasn't thinking about it at all. The code looked
like this:

assert( a|b <= max);

I meant (a|b) <= max, but the code ended up being a|(b <= max), which was
fairly useless.

I don't think bitwise being lower than comparison is useful, but we have the
difficulty here of maintaining C compatibility. The best fix we can get, if one
is really needed*, is to call it an error to have a bitwise operation next to
anything that trumps it, unless parenthesis are present.

The error brings instant attention to the trouble spot, and adding explicit
parens is no big trouble - I, and surely many others, usually do this by habit
anyway - so I'd be happy with this solution.

* (this is he only time I can recall being bitten by this in all my years of
writing C and friends, so it really isn't a big deal to me)

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to