5.6.3.4 Preprocessing and Messages
| Option | Description | Command Line |
|---|---|---|
| Preprocessor macros | Project-specific preprocessor macro defines passed via the compiler's
–D option. | |
| Include directories | Search these directories for project-specific include files. | |
| Make warnings into errors | Check to halt compilation based on warnings as well as
errors. Uncheck to halt compilation based on errors only. | -Werror |
| Additional warnings | Check to enable all warnings. Uncheck to disable warnings. | -Wall |
| support-ansi | Check to issue all warnings demanded by strict ANSI C. Uncheck to issue all warnings. | -ansi |
| strict-ansi | Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++. | -pedantic |
| Use CCI syntax | Enable support for the CCI syntax. | -mcci |
| Use IAR syntax | Enable support for syntax used by other toolchain vendors. | -mext=IAR |
| Errata | This option enables specific errata work-arounds identified by
ID. Valid values for ID change from time to time and may not be
required for a particular variant. The ID | -merrata=id |
| Enable cast align | Warn whenever a pointer is cast such that the required alignment of the target is increased. For example, warn if a char * is cast to an int * on machines where integers can only be accessed at two- or four-byte boundaries. | -Wcast-align |
| Smart IO forwarding level | This option attempts to statically analyze format strings passed to
printf, scanf and the ‘f’ and ‘v’ variations of these functions. Uses of
nonfloating point format arguments will be converted to use an
integer-only variation of the library functions. Equivalent to
-msmart-io=n option where n
equals:
| -msmart-io=n |
| Smart IO format strings | Specifies what the format arguments are when the compiler is unable to determine them. | -msmart-io-format=fmt |
| Disable ISR warn | Disable warning for inappropriate use of ISR function names. By
default the compiler will produce a warning if the
interrupt is not attached to a recognized interrupt
vector name. This option will disable that feature. | -mno-isr-warn |
| Enable SFR warnings | Enable warnings related to SFRs. | -msfr-warn=on|off |
| Enable macro expansion in pragma config value | This option will enable the support for macro expansion in
#pragma config value. For
example:After preprocessing the file the
#pragma config will
become: | -mexpand-pragma-config |
