The "if(x=0){ ... }" is an "issue" only because the assignment uses the operator "=" which is easily confused with "==" for the equality test.
It was still possible to write the assignment with ":=" (like in Pascal) and still use "==" for the equality test and still not "=" (unlike Pascal), to avoid the second issue with "x=0;" which would have been an _expression_ statement testing x but not using the result.
The final solution was to use ":=" for the assignment, "=" for the equality test, but allow _expression_ statements only after a keyword marking the fact we don't need to store the result, such as "void := x=0;" (needlesss) or "void := f();"; in that case "if(x=0){...}" is correctly performing a test of equality, and "if(x:=0){...}" is an assignment (whose result is false for if so that the block after it is not executed).
That "issue" is not really one, it does not "affect" the langages using "=" and "==". Assignments in the middle of expressions are very useful, and saves lots of lines of code.