CPP(1)

NAME
cpp - the C language preprocessor

SYNOPSIS
cpp [ -CHPRT ] [ -undef ] [ -Dname ]
[ -Dname=val ] [ -Idirectory ] [ -Uname ]
[ -Ydirectory ] [ [input-file [output-file]] ]

DESCRIPTION
cpp is the C language preprocessor. This implementation does not implement the ANSI C standard but K&R.

OPTIONS

-C  Pass all comments (except those that appear on lines with cpp directives) to the output. The default is to suppress C-style comments.

-H  Print the path names of include files on standard error. Each name is printed on a separate line, names may appear more than once.

-M  Generates a list of dependencies and write them to the output. This list is in makefile format and indicates that the related .o file depends on the input file and the used include files.

-P  Do not include line control information in the preprocessor output.

-R  Allow recursive macros.

-T  Only check for the first eight characters in macro names. This option allows backwards compatibility with old systems that only check for the first eight characters.

-noinclude
    Remove the standard system include directory (usually /usr/include) from the search path.

-undef
    Remove all initially predefined macros.

-xsc
    Character constants are treated as signed char regardless of the default in the compiler.

-xuc
    Character constants are treated as unsigned char regardless of the default in the compiler.

-Dname
    Defines name as 1. This option has the same effect as if a

    #define name 1

    line was in the input file.

-Dname=val
    Defines name as val. This option has the same effect as if a

    #define name val

    line was in the input file.

-Idirectory
    Adds directory to the search path for #include directives.

-Uname
    Remove an initial definition of name.

-Ydirectory
    Uses directory instead of the standard system include directory.

EXAMPLES

ENVIRONMENT

FILES

SEE ALSO

DIAGNOSTICS

NOTES
ANSI C preprocessors replace an escaped NEWLINE (a backslash that is immediately followed by a NEWLINE) with a SPACE. This implementation keeps backslash NEWLINE intact.

BUGS

AUTHOR
cpp was written by John F. Reiser in July/August 1978. This is a version enhanced by J. Schilling and maintained by J. Schilling since 2010.