Does this coerce distinct type a and b, or just fail if they are different types? The C one will evaluate the comparison / trinary expression via the usual integer promotion rules.
The C++ version does not promote types. The language is generally much stricter about implicit type conversions, so this is very much in line with the language design.