I always turn on all reasonable warnings in a compiler, and turn warnings into errors, so my code will be free of warnings. 

"All reasonable warnings" with one compiler that I use will warn for "if (x = y)" because it might be an unwanted assignment instead of a comparison. It will not warn for "if ((x = y))" - the unusual extra parentheses tell the compiler that this could isn't written that way by accident but intentional, so no warning. 

On the other hand, if you want to write this in one line, you can always write "if ((x = y) != 0)" or "if ((x = y) == true)".