# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MPLAB XC16 C-Compiler

- 1
- 2
…
- 239
- 240
- 241
- 242
- 243
…
- 365
- 366

Embedded Compiler Compatibility Mode
 2012-2013 Microchip Technology Inc. DS50002071C-page 241
B.4 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
Table B-3.
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.
Do not confuse the boolean type, bool, and the integer type, bit, implemented by
MPLAB XC8.
B.5 OPERATOR
The @ operator may be used with other compilers to indicate the desired memory loca-
tion of an object. As Table B-4 indicates, support for this syntax in MPLAB C is limited
to MPLAB XC8 only.
Any address specified with another device is unlikely to be correct on a new architec-
ture. Review the address in conjunction with the data sheet for your target Microchip
device.
Using @ in a compatibility mode with MPLAB XC8 will work correctly, but will generate
a warning. To prevent this warning from appearing again, use the reviewed address
with the MPLAB C __at() specifier instead.
For MPLAB XC16/32, consider using the address attribute.
1. Not all C99 features have been adopted by all Microchip MPLAB XC compilers.
TABLE B-3: SUPPORT FOR C99 BOOL TYPE
IAR Compatibility Mode
Type XC8 XC16 XC32
bool support support support
TABLE B-4: SUPPORT FOR NON-STANDARD OPERATOR
IAR Compatibility Mode
Operator XC8 XC16 XC32
@ native support error error

- 1
- 2
…
- 239
- 240
- 241
- 242
- 243
…
- 365
- 366