24.3 Data Type

Some compilers allow use of the boolean type, bool, as well as associated values true and false, as specified by the C99 ANSI Standard. This type and these values may be used by all MPLAB XC compilers when in compatibility mode(1), as shown in the table below.

As indicated by the ANSI Standard, the <stdbool.h> header must be included for this feature to work as expected when it is used with MPLAB XC compilers.

Table 24-3. Support for C99 bool Type
IAR Compatibility Mode
TypeXC8XC16XC32
boolsupportsupportsupport

Do not confuse the boolean type, bool, and the integer type, bit, implemented by MPLAB XC8.

1

Not all C99 features have been adopted by all Microchip MPLAB XC compilers.