CHARS(SIGNED) | CHARS(UNSIGNED)

Category

Floating-point and integer control

Pragma equivalent

#pragma chars

Purpose

Determines whether all variables of type char are treated as either signed or unsigned.

Syntax

Read syntax diagramSkip visual syntax diagram
             .-UNSIGNED-.      
>>-CHARS--(--+-SIGNED---+--)-----------------------------------><

Defaults

CHARS(UNSIGNED)

Parameters

UNSIGNED
Variables defined as char are treated as unsigned char.
SIGNED
Variables defined as char are treated as signed char.

Predefined macros

  • _CHAR_SIGNED is predefined to 1 when the CHARS(SIGNED) compiler option is in effect; otherwise it is undefined.
  • _CHAR_UNSIGNED is predefined to 1 when the CHARS(UNSIGNED) compiler option is in effect; otherwise it is undefined.