2.12. Preprocessor Options

The following command-line options control the preprocessor.

armcl Option (and alias)

tiarmclang Option

--define=<name>[=<value>] (-D=<name>[=<value>])

-D<name>[=<value>]

The armcl compiler provides the --define option to predefine a preprocessor macro. The macro symbol can be given a value if an assignment to the optional value argument is included.

The tiarmclang compiler’s -D option provides the same functionality. The tiarmclang compiler also provides the ability to append a macro parameter list in order to define function-style macros.

For both compilers, if the assignment to value argument is omitted, then the predefined symbol’s value is set to 1.

armcl Option (and alias)

tiarmclang Option

--undefine=<name> (-U=<name>)

-U<name>

The armcl compiler provides the --undefine option to undefine a preprocessor macro.

The tiarmclang compiler’s -U option provides the same functionality.

armcl Option (and alias)

tiarmclang Option

--preproc_dependency[=<file>] (-ppd[=<file>])

-M

The armcl compiler provides the --preproc_dependency option, which produces a list of dependency rules for use by a make utility. This list includes both system and user header files. When this option is used, the compiler executes only the preprocessor step of the compilation. Unless a filename is specified, the preprocessed output is sent to a file with an extension of .pp.

The tiarmclang compiler’s -M option provides the same functionality. However, the preprocessed output is sent to stdout by default.

armcl Option (and alias)

tiarmclang Option

--preproc_includes[=<file>] (-ppi[=<file>])

-MM

The armcl compiler provides the --preproc_includes option, which produces a list of dependency rules for use by a make utility. This list includes only user header files. When this option is used, the compiler executes only the preprocessor step of the compilation. Unless a filename is specified, the preprocessed output is sent to a file with an extension of .pp.

The tiarmclang compiler’s -MM option provides the same functionality. However, the preprocessed output is sent to stdout by default.

armcl Option (and alias)

tiarmclang Option

--preproc_only (-ppo)

-E

The armcl compiler provides the --preproc_only option, which causes the compiler to execute only the preprocessor step of the compilation. The preprocessed output is sent to a file with an extension of .pp.

The tiarmclang compiler’s -E option provides the same functionality. However, the preprocessed output is sent to stdout by default.

armcl Option (and alias)

tiarmclang Option

--preproc_macros{=<file>] (-ppm{=<file>])

-E -dM

The armcl compiler provides the --preproc_macros option, which produces a list of predefined and user-defined macros. When this option is used, the compiler executes only the preprocessor step of the compilation. Unless a filename is specified, the preprocessed output is sent to a file with an extension of .pp.

The tiarmclang compiler’s -E and -dM options used together provide the same functionality. However, the preprocessed output is sent to stdout by default.

armcl Option (and alias)

tiarmclang Option

--preproc_with_comment (-ppc)

-E -C

The armcl compiler provides the --preproc_with_comment option, which causes the compiler to execute only the preprocessor step of the compilation. It keeps the comments instead of discarding them as is done with the --preproc_only option. The preprocessed output is sent to a file with an extension of .pp.

The tiarmclang compiler’s -E and -C options used together provide the same functionality. However, output is sent to stdout by default.

armcl Option (and alias)

tiarmclang Option

--preproc_with_compile (-ppa)

not supported

The armcl compiler provides the --preproc_with_compile option, which causes the compiler to continue after executing one of the --preproc_* options that produce preprocessor output files.

The tiarmclang compiler does not support continuing compilation after generating preprocessor output with the -E option.

armcl Option (and alias)

tiarmclang Option

--preproc_with_line (-ppl)

-E

The armcl compiler provides the --preproc_with_line option, which causes the compiler to execute only the preprocessor step of the compilation. It adds line-control information (#line directives) to the output. Output is sent to a file with an extension of .pp.

The tiarmclang compiler’s -E option stops the compiler after the preprocessing stage. The preprocessed source code is emitted to stdout containing line-control information. The tiarmclang does not provide an option to disable the output of line-control information in the preprocessed output.