chars

Option Type Default Value #pragma options C C++
-qoption chars=unsigned CHARS=sign_type x x

Syntax

    -qchars=signed | -qchars=unsigned 
    CHARS=signed | CHARS=unsigned 

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

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


List of Batch Compiler Options and Their Defaults
Options that Specify Compiler Characteristics
Equivalent Batch Compile-Link and Incremental Build Options