Microchip Technology SW006022-2N Data Sheet
MPLAB
®
XC16 C COMPILER
USER’S GUIDE
2012 Microchip Technology Inc.
DS52071B-page 91
Chapter 5. Differences Between MPLAB XC16 and ANSI C
This compiler conforms to the ANS X3.159-1989 Standard for programming languages.
This is commonly called the C89 Standard. It is referred to as the ANSI C Standard in
this manual. Some features from the later standard C99 are also supported.
This is commonly called the C89 Standard. It is referred to as the ANSI C Standard in
this manual. Some features from the later standard C99 are also supported.
5.1
DIVERGENCE FROM THE ANSI C STANDARD
There are no divergences from the ANSI C standard.
5.2
EXTENSIONS TO THE ANSI C STANDARD
The MPLAB XC16 C Compiler provides extensions to the ANSI C standard in these
areas: keywords and expressions.
areas: keywords and expressions.
5.2.1
Keyword Differences
The new keywords are part of the base GCC implementation and the discussions in the
referenced sections are based on the standard GCC documentation, tailored for the
specific syntax and semantics of the 16-bit compiler port of GCC.
referenced sections are based on the standard GCC documentation, tailored for the
specific syntax and semantics of the 16-bit compiler port of GCC.
• Specifying Attributes of Variables – Section 6.11 “Variable Attributes”
• Specifying Attributes of Functions – Section 10.2.1 “Function Specifiers”
• Inline Functions – Section 10.6 “Inline Functions”
• Variables in Specified Registers – Section 7.9 “Allocation of Variables to Reg-
• Complex Numbers – Section 6.7 “Complex Data Types”
5.2.2
Expression Differences
Expression differences are:
• Binary Constants – Section 6.8 “Literal Constant Types and Formats”.
5.3
IMPLEMENTATION-DEFINED BEHAVIOR
Certain features of the ANSI C standard have implementation-defined behavior. This
means that the exact behavior of some C code can vary from compiler to compiler.
means that the exact behavior of some C code can vary from compiler to compiler.
The exact behavior of the MPLAB XC16 C Compiler is detailed throughout this
documentation, and is fully summarized in Appendix A. “Implementation-Defined
Behavior”.
documentation, and is fully summarized in Appendix A. “Implementation-Defined
Behavior”.