chars

Applies to C Applies to C++

Purpose

Instructs the compiler to treat all variables of type char as either signed or unsigned.

Syntax


Syntax Diagram

See also #pragma chars and #pragma options.

Notes

You can also specify sign type in your source program using either of the following preprocessor directives:

#pragma options chars=sign_type
 
#pragma chars (sign_type)

where sign_type is either signed or unsigned.

Regardless of the setting of this option, the type of char is still considered to be distinct from the types unsigned char and signed char for purposes of type-compatibility checking or C++ overloading.

Example

To treat all char types as signed when compiling myprogram.c, enter:

xlc myprogram.c -qchars=signed

Related References

Compiler Command Line Options
#pragma chars
#pragma options IBM Copyright 2003