GCC assumes that a program you feed its C compiler is written in C. If
what you feed it cannot be a valid program (e.g. it contains a syntax
error), it errors. If it's likely that it's invalid, it often warns. But
if what you feed it has one valid interpretation and one which must be
invalid, of course it must pick the valid interpretation. Anything else
would lead to its being unable to compile valid programs, which would be a
standards violation (and bloody annoying).