cpp(1)

cpp(1)

NAME

cpp - the C language preprocessor

SYNOPSIS

/usr/ccs/lbin/cpp [option ...] [i®le [o®le] ]

DESCRIPTION

cpp is the C language preprocessor which is invoked as the ®rst pass of any C compilation using the cc command (see cc(1)). Its purpose is to process #include and conditional compilation instructions and macros. Thus the output of cpp is designed to be in a form acceptable as input to the next pass of the C compiler. As the C language evolves, cpp and the rest of the C compilation package will be modi®ed to follow these changes. Therefore, the use of cpp in other than this framework is not suggested. The preferred way to invoke cpp is through the cc command, since the functionality of cpp may someday be moved elsewhere. See m4(1) for a general macro processor.

cpp optionally accepts two ®le names as arguments. i®le and o®le are respectively the input and output for the preprocessor. They default to standard input and standard output if not speci®ed.

Options

The following options are recognized by cpp:

-A

Remove all prede®ned symbols that begin with a letter and _HPUX_SOURCE . The user is

 

expected to de®ne _POSIX_SOURCE or _XOPEN_SOURCE when using this option.

-C

By default, cpp strips C-style comments.

If the -Coption is speci®ed, all comments

 

(except those found on cpp directive lines) are passed along.

 

-Dname

De®ne name as if by a #define directive. If no =def is given, name is de®ned as 1. The

-Dname=def

 

-Doption has lower precedence than the -Uoption. Thus, if the same name is used in

 

both a -Uoption and a -Doption, the name is unde®ned regardless of the order of the

 

options.

 

 

 

-Hnnn

Change the internal macro de®nition table to be nnn bytes in size. The default buffer size

 

is at least 8 188 bytes.

This option serves to eliminate ``Macro param too large'', ``Macro

 

invocation too large'', ``Macro param too large after substitution'', ``Quoted macro param too

 

large'', ``Macro buffer too small'', ``Input line too long'', and ``Catenated input line too long''

 

errors.

 

 

 

-h[inclfile ]

Generates included ®les and sents the results to the ®le incl®le. If the argument incl®le is

 

omitted, the result is sent to the standard error.

 

-Idir

Change the algorithm for searching for #include ®les whose names do not begin with /

 

to look in dir before looking in the directories on the standard list. Thus, #include ®les

 

whose names are enclosed in double quotes (" ") are searched for ®rst in the directory of

 

the ®le containing the #include line, then in directories named in -Ioptions in left-to-

 

right order, and last in directories on a standard list. For #include ®les whose names

 

are enclosed in angle brackets (<>), the directory of the ®le containing the #include line

 

is not searched. However, directory dir is still searched.

 

-M[makefile ]

Generates make®le dependencies and sends the results to the ®le make®le. If the argu-

 

ment make®le is omitted, the result is sent to the standard error.

 

-P

Preprocess the input without producing the line-control information used by the next pass

 

of the C compiler.

 

 

 

-T

HP-UXno longer restricts preprocessor symbols to eight characters. The -Toption forces

 

cpp to use only the ®rst eight characters for distinguishing different preprocessor names.

 

This behavior is the same as preprocessors on some other systems with respect to the

 

length of names, and is included for backward compatibility.

 

-Uname

Remove any initial de®nition of name, where name is a reserved symbol that is prede®ned

 

by the particular preprocessor. The current list of these symbols includes:

 

Operating system:

unix

_ _unix

 

 

Hardware:

hp9000s200

hp9000s300

_ _hp9000s300

 

 

hp9000s500

hp9000s800

_ _hp9000s800

 

 

hp9000ipc

hppa

_ _hppa

c

HP-UX Release 11i: December 2000

− 1 −

Section 1121