Name
cpp
Synopsis
cpp [options] [ ifile [ ofile ] ]GNU C language preprocessor. cpp is normally invoked as the first pass of any C compilation by the gcc command. The output of cpp is a form acceptable as input to the next pass of the C compiler. The ifile and ofile options are, respectively, the input and output for the preprocessor; they default to standard input and standard output.
Options
- -$
Do not allow $ in identifiers.
- -ansi
Use 1990 ISO C standard. This is equivalent to -std=c89.
- -dD
Similar to -dM, but exclude predefined macros and include results of preprocessing.
- -dM
Suppress normal output. Print series of #defines that create the macros used in the source file.
- -dN
Similar to -dD, but don’t print macro expansions.
- -dI
Print #include directives in addition to other output.
- -fpreprocessed
Treat file as already preprocessed. Skip most processing directives, remove all comments, and tokenize file.
- -ftabstop= width
Set distance between tabstops so columns will be reported correctly in warnings and errors. Default is 8.
- -fno-show-column
Omit column numbers in warnings and errors.
- -gcc
Define _ _GNUC_ _, _ _GNUC_MINOR_ _, and _ _GNUC_PATCHLEVEL_ _ macros.
- --help
Print usage message and exit.
- -idirafter dir
Search dir for header files when a header file is not found in any of the included directories.
- -imacros file
Process macros in file before processing main files.
- -include file
Process file before main file.
- -iprefix prefix
When adding directories with -iwithprefix, prepend ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access