a==b=c
== has higher precedence than =, so this is parsed as (a==b) = c. The result of the built-in operator== is a bool rvalue, built-in operator= requires a modifiable lvalue, so this does not compile
a=b==c
== has higher precedence than =, so this is parsed as a=(b==c). The result of == is bool, this will compile if a has a type that can be assigned from bool (e.g. int)
a==b==c
== has left-to-right associativity, so this is compiled as (a==b)==c, the result of a==b is bool, and this compiles as long as c can be compared to bool (e..g if c is int)