|
|
coherent
cpp Command cpp
C preprocessor
ccpppp [_o_p_t_i_o_n...] [_f_i_l_e...]
TThhee ccoommmmaanndd ccpppp ccaallllss tthhee CC pprreepprroocceessssoorr ttoo ppeerrffoorrmm CC pprreepprroocceess-
ssiinngg. IItt ppeerrffoorrmmss tthhee ooppeerraattiioonnss ddeessccrriibbeedd iinn sseeccttiioonn 33.88 ooff tthhee
AANNSSII SSttaannddaarrdd; tthheessee iinncclluuddee ffiillee iinncclluussiioonn, ccoonnddiittiioonnaall ccooddee
sseelleeccttiioonn, ccoonnssttaanntt ddeeffiinniittiioonn, aanndd mmaaccrroo ddeeffiinniittiioonn. SSeeee tthhee
eennttrryy oonn pprreepprroocceessssiinngg ffoorr aa ffuullll ddeessccrriippttiioonn ooff tthhee CC'ss
pprreepprroocceessssiinngg llaanngguuaaggee.
NNoorrmmaallllyy, ccpppp iiss uusseedd ttoo pprreepprroocceessss CC pprrooggrraammss, bbuutt iitt ccaann bbee
uusseedd aass aa ssiimmppllee mmaaccrroo pprroocceessssoorr ffoorr ootthheerr ttyyppeess ooff ffiilleess aass
wweellll. ccpppp rreeaaddss eeaacchh iinnppuutt ffiillee, pprroocceesssseess ddiirreeccttiivveess, aanndd
wwrriitteess iittss pprroodduucctt oonn ssttddoouutt. If the option -E is not used, cpp
also writes into its output statements of the form #lliinnee_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:
-DD_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.
-EE 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.
-II _d_i_r_e_c_t_o_r_y
C allows two types of #include directives in a C program,
i.e., #iinncclluuddee "ffiillee.hh" and #include <file.h>. The -I
option tells ccpppp to search a specific directory for the
files you have named in your #iinncclluuddee directives, in addi-
tion to the directories that it searches by default. You
can have more than one -II option on your cccc command line.
-oo _f_i_l_e
Write output into file. If this option is missing, cpp
writes its output onto ssttddoouutt, which may be redirected.
-UU_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
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.