

cpp                          Command                          cpp




C preprocessor

ccpppp [_o_p_t_i_o_n...] [_f_i_l_e...]

TThhee ccoommmmaanndd ccpppp ccaallllss  tthhee CC pprreepprroocceessssoorr ttoo ppeerrffoorrmm CC pprreepprroocceess-
ssiinngg.  IItt ppeerrffoorrmmss tthhee ooppeerraattiioonnss ddeessccrriibbeedd iinn sseeccttiioonn 33.88 ooff tthhee
AANNSSII  SSttaannddaarrdd; tthheessee  iinncclluuddee ffiillee  iinncclluussiioonn,  ccoonnddiittiioonnaall ccooddee
sseelleeccttiioonn,  ccoonnssttaanntt ddeeffiinniittiioonn, aanndd  mmaaccrroo ddeeffiinniittiioonn.   SSeeee tthhee
eennttrryy  oonn  pprreepprroocceessssiinngg  ffoorr  aa  ffuullll  ddeessccrriippttiioonn  ooff  tthhee  CC'ss
pprreepprroocceessssiinngg llaanngguuaaggee.

NNoorrmmaallllyy, ccpppp  iiss uusseedd  ttoo pprreepprroocceessss CC  pprrooggrraammss, bbuutt iitt  ccaann bbee
uusseedd  aass aa  ssiimmppllee mmaaccrroo  pprroocceessssoorr ffoorr ootthheerr  ttyyppeess ooff  ffiilleess aass
wweellll.   ccpppp  rreeaaddss eeaacchh  iinnppuutt  ffiillee,  pprroocceesssseess ddiirreeccttiivveess,  aanndd
wwrriitteess iittss pprroodduucctt oonn ssttddoouutt.  If  the option -E is not used, cpp
also  writes  into  its  output  statements  of the  form  #lliinnee_n
_f_i_l_e_n_a_m_e, so  that the parser  will be able to  connect its error
messages and  debugger output with  the original line  numbers in
your source files.

***** Options *****

The following summarizes cpp's options:

-DD_V_A_R_I_A_B_L_E
     Define  VARIABLE for the  preprocessor at  compilation time.
     For example, the command

             cc -DLIMIT=20 foo.c

     tells the  preprocessor to define  the variable LIMIT  to be
     20.   The  compiled program  acts  as  though the  directive
     #define LIMIT 20 were included before its first line.

-EE   Strip  all comments and  line numbers from  the source code.
     This option is used to preprocess assembly-language files or
     other sources,  and should not  be used with  the other com-
     piler phases.

-II _d_i_r_e_c_t_o_r_y
     C allows  two types of  #include directives in  a C program,
     i.e.,  #iinncclluuddee  "ffiillee.hh"  and  #include <file.h>.   The  -I
     option  tells ccpppp  to search  a  specific directory  for the
     files you  have named in your  #iinncclluuddee directives, in addi-
     tion to  the directories that  it searches by  default.  You
     can have more than one -II option on your cccc command line.

-oo _f_i_l_e
     Write  output into  file.  If  this  option is  missing, cpp
     writes its output onto ssttddoouutt, which may be redirected.

-UU_V_A_R_I_A_B_L_E
     Undefine VARIABLE,  as if an #undef  directive were included
     in  the  source  program.   This  is  used to  undefine  the


COHERENT Lexicon                                           Page 1




cpp                          Command                          cpp



     variables that cpp defines by default.

***** See Also *****

C preprocessor, cc, commands




















































COHERENT Lexicon                                           Page 2


