Type Checking

Type checking is now ANSI-compliant which means that type short and type int are distinct types. For example, this is a redefinition in Microsoft C 7.0 that was accepted by version 6.0.

int myfunc();

short myfunc();

This next example also generates a warning about indirection to different types:

int *pi;

short *ps;

ps = pi; /* Generates warning under C 7.0 */

The C 7.0 compiler also generates warnings for differences in sign. For example,

signed int *pi;

unsigned int *pu

pi = pu; /* Generates warning under C 7.0 */