As with expressions, the rules for the types of certain integral constants have changed. In K&R C, an unsuffixed decimal constant had type int only if its value fit in an int; an unsuffixed octal or hexadecimal constant had type int only if its value fit in an unsigned int. Otherwise, an integral constant had type long. At times, the value did not fit in the resulting type. In the 1990 ISO/IEC C standard, the constant type is the first type encountered in the following list that corresponds to the value:
unsuffixed decimal: int, long, unsigned long
unsuffixed octal or hexadecimal: int, unsigned int, long, unsigned long
U suffixed: unsigned int, unsigned long
L suffixed: long, unsigned long
UL suffixed: unsigned long
The ISO C compiler warns you, when you use the -xtransition option, about any expression whose behavior might change according to the typing rules of the constants involved. The old integral constant typing rules are used only in the transition mode; the ISO and conforming modes use the new rules.
The rules for typing unsuffixed decimal constants has changed in accordance with the 1999 ISO C standard. See 2.1.1 Integral Constants .