VMS Help  —  CC  Messages  UNSIGNEDPRES
 Message        <Context> the conversion of the unsigned char/short
                value "<expression>" to unsigned int shows one
                example of this program's use of unsigned-preserving
                integral promotion.  This differs from the
                value-preserving semantics of standard C compilers.

 Description    This expression shows one of possibly many places
                where this compilation uses unsigned-preserving
                semantics for small integer promotions rather than
                value-preserving semantics required of standard C
                compilers.  In cases where an unsigned char or
                unsigned short int is promoted to an integer, there
                are two different ways the convert could happen.
                Standard C requires that the type be converted to a
                signed int (value-preserving semantics) while some
                older compilers will convert to an unsigned int
                (unsigned-preserving semantics).  The difference in
                the choice of int or unsigned int can have an impact
                on results of expressions that use the converted
                value.  The compiler cannot determine whether or not
                a particular instance of this usage will cause an
                observable behavior difference in the program.  For
                more information, consult Section 3.2.1.1 of the
                Rationale for ANSI C.

 User Action    Be aware that standard compilers might interpret this
                expression differently.
Close Help