I encountered a bug recently from a precedence mistake. Someone had written
if (a = b == c), intending
if ((a = b) == c) - but in C
== has higher precedence than
=, so that wasn't how the parser saw it. The typechecker didn't object, because the result type of
== in C is
int, so all was apparently well. None of the humans noticed either, perhaps because
b was a large expression, so the two infix operators were far apart.
Operator precedence saves lots of parentheses, but it does occasionally lead to bugs. It's one of the class of language features that work by resolving ambiguity, and these have a common hazard: when you don't notice the ambiguity, it will still be resolved, and not necessarily as you intend.