Microchip Technology SW006023-3N 数据表

下载
页码 238
Compiler Command Line Driver
 2012 Microchip Technology Inc.
DS51686E-page 63
3.9.3
Options for Controlling the C Dialect
The following options define the kind of C dialect used by the compiler.
TABLE 3-6:
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.
-fcheck-new / 
-fno-check-new 
(default)
Check that the pointer returned by operator new is non-null.
-fenforce-eh-specs 
(default) / 
-fno-enforce-eh-specs
Generate/Do not generate code to check for violation of 
exception specifications at runtime. The 
-fno-enforce-eh-specs
 option violates the C++ 
standard, but may be useful for reducing code size in 
production builds, much like defining `NDEBUG'. This does 
not give user code permission to throw exceptions in 
violation of the exception specifications; the compiler will still 
optimize based on the specifications, so throwing an 
unexpected exception will result in undefined behavior. 
-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.
-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.
-fno-exceptions
Disable C++ exception handling. This option disables the 
generation of extra code needed to propagate exceptions.
-fno-rtti
Enable/Disable runtime type-identification features. The 
-fno-rtti
 option disables generation of information about 
every class with virtual functions for use by the C++ runtime 
type identification features ('dynamic_cast' and 'typeid'). If 
you don't use those parts of the language, you can save 
some space by using this flag. Note that exception handling 
uses the same information, but it will generate it as needed. 
The 'dynamic_cast' operator can still be used for casts that 
do not require runtime type information, i.e. casts to 
void 
*
 
or to unambiguous base classes.