Microchip Technology SW006022-2N Data Sheet

Page of 338
Compiler Command-Line Driver
 2012 Microchip Technology Inc.
DS52071B-page 63
3.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 3-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.
-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.
-fno-builtin
-fno-builtin-function
Don’t recognize built-in functions that do not begin with 
_ _
builtin_
 as prefix.
-fsigned-char
Let the type char be signed, like signed char. 
(This is the default.)
TABLE 3-6:
KIND-OF-OUTPUT CONTROL OPTIONS (CONTINUED)
Option
Definition