pcc-cpp man page
cpp — C preprocessor
|cpp|| [-ACEMPtVv] [-D |
The cpp utility is a macro preprocessor used by the pcc(1) compiler. It is mainly used to include header files, expand macro definitions, discard comments, and perform conditional compilation. cpp is written to comply with the ISO/IEC 9899:1999 (“ISO C99”) specification.
infile input file is optional. If not provided or the file name is “-” (dash), cpp reads its initial file from standard input. The
outfile output file is also optional, with output written to standard output if not provided.
The options are as follows:
- For assembler-with-cpp input: treat non-directive lines starting with a # as comments.
- Do not discard comments.
- Create a macro definition before processing any input, as if a
directive had appeared in the source. If
valueis not set on the command-line, then a value of 1 is used.
- Modify output according to
flags, which can be a list of character flags. The following flags are currently supported:
- Do not process any input, but output a list of “#define” statements for all defined macros other than builtin macros (see below).
any unknown flags are ignored.
- Modify the exit code, if there were any warnings.
pathto the list of directories searched by the “#include” directive. This may be used to override system include directories (see -S
option). -I may be specified multiple times and is cumulative.
- Include a file before processing any input, as if a
directive had appeared in the source. -i may be specified multiple times to include several files.
- Instead of producing a processed C code file, output a list of dependencies for make(1), detailing the files that need to be processed when compiling the input.
- Inhibit generation of line markers. This is sometimes useful when running the preprocessor on something other than C code.
pathto the list of system directories searched by the “#include” directive. The -S option may be specified multiple times and is cumulative.
- Traditional cpp syntax. Do not define the __TIME__, __DATE__, __STDC__, and __STDC_VERSION__ macros.
- Undefine a macro before processing any input, as if a
directive had appeared in the source.
- Verbose debugging output. -V can be repeated for greater detail. (This is only available if the cpp program was built with PCC_DEBUG defined, which is the default).
- Display version.
The -D, -i and -U options are processed in the order that they appear on the command line, before any input is read but after the command line options have been scanned.
Files referenced by the “#include” directive as “...”, are first looked for in the current directory, then as per ⟨...⟩ files, which are first looked for in the list of directories provided by any -I options, then in the list of system directories provided by any -S options. Note that cpp does not define any include directories by default; if no -I or -S options are given, then only the current directory will be searched and no system files will be found. A few macros are interpreted inside the cpp program: Also see the -t option.
A few macros are interpreted inside the cpp program:
Also see the -t option.
The cpp utility exits with one of the following values:
- Successfully finished.
- An error occurred.
- The -E option was given, and warnings were issued.
as(1), ccom(1), make(1), pcc(1), asctime(3)
The cpp command comes from the original Portable C Compiler by, written in the late 70's. The code originates from the V6 preprocessor with some additions from V7 cpp and ansi/c99 support.
A lot of the PCC code was rewritten by.
This product includes software developed or owned by Caldera International, Inc.