|
|
Only in the transition (-Xt) mode will the ANSI C compiler use the unsigned preserving promotions; in the other two modes, conforming (-Xc) and ANSI (-Xa), the value preserving promotion rules will be used. Using cc-v will cause the compiler to warn you about each expression whose behavior might depend on the promotion rules used.
This warning is not optional since this is a serious change in behavior. Fortunately, these situations do not often occur, and it is always possible to suppress the warning by making the intended behavior explicit, as is shown below.