CPP ( 1) USER COMMANDS CPP( 1) 0 NAME cpp - the C language preprocessor SYNOPSIS /llb/cpp [ -P -C -Uname -Dname -Dname=def -ldir] [ itile [ ofile] J DESCRIPTION Cpp is the C language preprocessor which is invoked as the first pass or any C compilation using the cc(l) command ( cpp may optionally be invoked as the first pass or a FORTRAN 77 or Pascal compilation - see /77(1) or pc(l)). Thus the output or cpp is designed to be in a form accept- able as input to the next pass or the C compiler. The preferred way to invoke cpp is through the cc(l) command. See m4(1) for a general macro processor. Cpp optionally accepts two file names as arguments.
/file and ofile are respectively the input and output for the preprocessor. They default to standard input and standard output if not sup- plied. OPTIONS -P Preprocess the input without producing the line control information used by the next pass of the C compiler. -C Pass all comments (except those which appear on cpp directive lines) through the prepro- cessor. By default, cpp strips C-style comments. -Uname Remove any initial definition or name, where name is a reserved symbol that is predefined by the particular preprocessor. The current list or these possibly reserved symbols includes: operating system: hardware: UNIX System variant:
0 ibm, gcos, os, tss, unix interdata, pdpll, u370, u3b, vax, mc68000 RES, RT, sun -Dname Define name as 1 (one). This is the same as if a -Dname=l option had appeared on the cpp command line, or as if a #define name 1 line had appeared in the source file that cpp is processing. -Dname=def Define name as if by a #define directive. This is the same as if a #define name def line had appeared in the source file that cpp is processing. -ldir Change the algorithm for searching for #Include files whose names do not begin with / to look in dir before looking in the directories on the standard list.
Thus, #Include files whose names are enclosed in • • will be searched for first in the directory of the ifile argument, then in directories named in -I options, and last in directories on a standard list. For #Include files whose names are enclosed in , the directory of the ifile argu- ment is not searched. See the section entitled Details of the CPP Preprocessor, below, for exact details or the search order. -R Allow recursive macros. CPP DIRECTIVES All cpp directives start with lines begun by #. The directives are: #define name token-string Replace subsequent instances or name with token-string. #define name( arg, ...
, arg) token-string Notice that there can be no space between name and the '('. Replace subsequent instances or name followed by a '(', a list of comma-separated tokens, and a '(' by token- 0 string where each occurrence or an arg in the token-string is replaced by the Sun Release 1.4 Last change: g August rn84 55