DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Complying with standard C

Compilation behavior

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.


Next topic: First example: using a cast
Previous topic: Background

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004