Two or more incompatible declarations of the same function or object must not appear in the same program because they result in undefined behavior. Subclause 6.2.7 of the C standard mentions that two types may be distinct yet compatible, and addresses precisely when two distinct types are compatible.
The C Standard identifies three distinct situations in which undefined behavior (UB) may arise as a result of incompatible declarations of the same function or object:
...