Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
MPLAB
®
XC16 C Compiler Users Guide
DS50002071C-page 86 2012-2013 Microchip Technology Inc.
5.7.3 Options for Controlling the C Dialect
The following options define the kind of C dialect used by the compiler.
-x You can specify the input language explicitly with the -x option:
-x language
Specify explicitly the language for the following input files (rather than
letting the compiler choose a default based on the file name suffix). This option
applies to all following input files until the next -x option.
The following values are supported by the compiler:
c c-header cpp-output
assembler assembler-with-cpp
-x none
Turn off any specification of a language, so that subsequent files are handled
according to their file name suffixes. This is the default behavior but is needed if
another -x option has been used.
For example:
xc16-gcc -x assembler foo.asm bar.asm -x none main.c
mabonga.s
Without the -x none, the compiler will assume all the input files are for the
assembler.
--help Print a description of the command line options.
TABLE 5-7: C DIALECT CONTROL OPTIONS
Option Definition
-ansi Support all (and only) ANSI-standard C programs.
-aux-info filename Output to the given file name prototyped declarations for all
functions declared and/or defined in a translation unit,
including those in header files. This option is silently
ignored in any language other than C. Besides
declarations, the file indicates, in comments, the origin of
each declaration (source file and line), whether the declara-
tion was implicit, prototyped or unprototyped (I, N for new
or O for old, respectively, in the first character after the line
number and the colon), and whether it came from a
declaration or a definition (C or F, respectively, in the
following character). In the case of function definitions, a
K&R-style list of arguments followed by their declarations is
also provided, inside comments, after the declaration.
-menable-fixed
[=rounding mode]
Enable fixed-point variable types and arithmetic operation
support. Optionally, set the default rounding mode to
one of truncation, conventional, or convergent. If the
rounding mode is not specified, the default is truncation.
-ffreestanding Assert that compilation takes place in a freestanding
environment. This implies -fno-builtin. A freestanding
environment is one in which the standard library may not
exist, and program startup may not necessarily be at main.
The most obvious example is an OS kernel. This is
equivalent to -fno-hosted.
-fno-asm Do not recognize asm, inline or typeof as a keyword,
so that code can use these words as identifiers. You can
use the keywords
__asm__, __inline__ and
__typeof__ instead.
-ansi implies -fno-asm.
TABLE 5-6: KIND-OF-OUTPUT CONTROL OPTIONS (CONTINUED)
Option Definition
Protego_Release_01_05-Related-OEM-Documentation-MPLAB-XC16-C-Compiler.pdf