-A "
name(
tokens)"
This option can be used to define an assertion, as if by a preprocessor #assert
directive (see the section “Extensions over ANSI/ISO C” in the C/C++ User Guide [4]). The quotes are required because of the special significance of parentheses in the POSIX shell. The parentheses can alternatively be nullified with the backslash:-A
name\(
tokens\)
-C
This option is evaluated only if the -E
or -P
option is also specified (see "Options for selecting compilation phases"). It causes C or C++ comments to be retained in the preprocessor output. Such comments are removed by default.
-D
name[=
value]
This option can be used to define names, symbolic constants and macros (as if by a preprocessor #define
directive). -D
name has the same effect as the statement #define
name 1
;-D
name=value corresponds to the #define
directive for text substitutions,
i.e. #define
name value.
-H
Causes a list of all header files used during the compilation run to be written to the standard error output stderr
.
-i
header
This option specifies an include file header which is inserted before the source program text (pre-include).
You can specify the header as follows:
by giving the fully qualified path name of the include file
by giving the relative path name of the include file on the basis of the option
-I
The include file specified as the header will be handled in exactly the same way as any include file where an #include
statement is specified at the beginning of the source program file. If several header files are to be pre-included, the corresponding #include instructions must be collected together in a single include file which is then specified using the option -i
.
-I
dir
dir is added to the list of directories that are searched by the preprocessor for header files. If this option is entered more than once, the order of entry determines the search order for header files.
If the relative pathname of the header file (which does not begin with a slash /) is specified in the #include
directive enclosed within quotes "...", the preprocessor searches the directories in the following order:
the directory of the source or header file containing the
#include
directivethe directories that were specified with the preprocessor
-I
optioneither the directories specified with the
-Y I
option or the standard directories (see "Using the POSIX library functions")
If the relative pathname of the header file is specified in the #include
directive enclosed within angular brackets <
...>
, the preprocessor will only search the directories listed under points 2 and 3 above.
If you want the preprocessor to search some other directories last instead of the standard directories listed above, you can specify such directories by using the -Y I
option (see below).
-K
arg1[,arg2...]
General input rules for the -K
option can be found in section "Calling syntax and general rules".
The following entries are possible as arg arguments to control preprocessor behavior:
ansi_cpp
kr_cpp
-K ansi_cpp
is the default setting in all C and C++ language modes of the compiler. This means that preprocessor behavior in accordance with the ANSI/ISO C standard is also supported in the K&R C mode.
The obsolete preprocessor behavior based on Reiser cpp and Johnson pcc can be turned on with -K kr_cpp
.
-U
name
Undefines a macro or a symbolic constant name (as when using the preprocessor directive #undef
), where name is a predefined preprocessor name (see "Predefined preprocessor names") or a name that was defined with the -D
option in the command line before or after option -U
.This option has no effect on #define
directives in the source program.
-Y I
,dir[:dir...]
Instructs the preprocessor which directory or directories are to be searched for header files last. dir specifies the directory.
Without this option, the last directories to be searched are the standard directories (see "Using the POSIX library functions").