If it were syntactically incorrect, a C compiler would complain.
The banana is flying like an arrow.
Is there any kind of error in this sentence? Any language analysis machine, whatever is its intellectual level, will not be able to find any error in this English Language sentence.
But, a school boy will immediately say that there is a semantic error in this sentence.
Compiler is not a divine element; it is a product of human being. Compilation reports (errors and warnings) are always judged by the human operator from realistic/logical point of view. The point is that a variable should be compared against a constant and not the other way.