Microchip Technology SW006023-1N Data Sheet
MPLAB
®
XC32 C/C++ Compiler User’s Guide
DS51686E-page 64
2012 Microchip Technology Inc.
3.9.4
Options for Controlling the C++ Dialect
The following options define the kind of C++ dialect used by the compiler.
-fsigned-char
Let the type
char
be signed, like
signed char
.
(This is the default.)
-fsigned-bitfields
-funsigned-bitfields
-fno-signed-bitfields
-fno-unsigned-bitfields
These options control whether a bit field is signed or
unsigned, when the declaration does not use either signed
or unsigned. By default, such a bit field is signed, unless
-traditional
unsigned, when the declaration does not use either signed
or unsigned. By default, such a bit field is signed, unless
-traditional
is used, in which case bit fields are always
unsigned.
-funsigned-char
Let the type char be unsigned, like unsigned char.
-fwritable-strings
Store strings in the writable data segment and do not make
them unique.
them unique.
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 filename 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 declaration 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.
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 declaration 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 start-up may not necessarily be at main.
The most obvious example is an OS kernel. This is
equivalent to -fno-hosted.
environment. This implies -fno-builtin. A freestanding
environment is one in which the standard library may not
exist, and program start-up 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
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_
_ _builtin_
as prefix.
-fsigned-char
Let the type char be signed, like signed char.
(This is the default.)
(This is the default.)
-fsigned-bitfields
-funsigned-bitfields
-fno-signed-bitfields
-fno-unsigned-bitfields
These options control whether a bit field is signed or
unsigned, when the declaration does not use either signed
or unsigned. By default, such a bit field is signed, unless
-traditional
unsigned, when the declaration does not use either signed
or unsigned. By default, such a bit field is signed, unless
-traditional
is used, in which case bit fields are always
unsigned.
-funsigned-char
Let the type char be unsigned, like unsigned char.
-fwritable-strings
Store strings in the writable data segment and do not make
them unique.
them unique.
TABLE 3-6:
C DIALECT CONTROL OPTIONS (CONTINUED)
Option
Definition