📄 0081-0082.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>
</HEAD>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311046 //-->
<!-- TITLE=Linux Complete Command Reference//-->
<!-- AUTHOR=Red Hat//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=01 //-->
<!-- PAGES=0001-0736 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0078-0080.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0083-0083.html">Next</A></CENTER></P>
<A NAME="PAGENUM-81"><P>Page 81</P></A>
<TABLE>
<TR><TD>
_V, —version-control
</TD><TD>
The type of backups made can be set with the
VERSION_CONTROL environment variable, which
</TD></TR><TR><TD>
{numbered,existing,simple}
</TD><TD>
can be overridden by this option. If
VERSION_CONTROL is not set and this option is not
given, the default backup type is existing. The value of the
VERSION_CONTROL environment variable and the argument to this option are like the GNU
emacs version- control variable; they also recognize synonyms that are more descriptive. The valid values are (unique
abbreviations are accepted) the following:
</TD></TR></TABLE>
<TABLE>
<TR><TD>
</TD><TD>
t or numbered
</TD><TD>
Always make numbered backups
</TD></TR><TR><TD>
</TD><TD>
nil or existing
</TD><TD>
Make numbered backups of files that already have
them, simple backups of the others
</TD></TR><TR><TD>
</TD><TD>
never or simple
</TD><TD>
Always make simple backups
</TD></TR></TABLE>
<H3><A NAME="ch01_ 43">
cccp, cpp
</A></H3>
<P>cccp, cpp—The GNU C-compatible compiler preprocessor
</P>
<P><B>
SYNOPSIS
</B></P>
<!-- CODE //-->
<PRE>
cccp [_$][_A predicate [( value )]] [ _C ][_D name [ = definition ]]
[_dD][_dM][_I\ directory ][_H ][_I_ ][_imacros file ][_
include file ][_idirafter dir ][_iprefix prefix ][_iwithprefix dir ]
[ _lang_c][_lang_c++][_lang_objc ][_lang_objc++ ][_lint ][_
M[_MG ]] [ _MM[_MG ]] [ _MD file ][_MMD file ][_nostdinc ]
[ _nostdinc++][_P][_pedantic ][_pedantic_errors ][_traditional ]
[ _trigraphs ][_U name ][_undef ][_Wtrigraphs ][_Wcomment ]
[ _Wall ][_Wtraditional ]
[ infile |_ ][ outfile |_ ]
</PRE>
<!-- END CODE //-->
<P><B>
DESCRIPTION
</B></P>
<P>The C preprocessor is a macro processor that is used automatically by the C compiler to transform your program
before actual compilation. It is called a macro processor because it allows you to define macros, which are brief abbreviations
for longer constructs.
</P>
<P>The C preprocessor provides four separate facilities that you can use as you see fit:</P>
<UL>
<LI> Inclusion of header files. These are files of declarations that can be substituted into your program.
<LI> Macro expansion. You can define macros, which are abbreviations for arbitrary fragments of C code, and then the
C preprocessor will replace the macros with their definitions throughout the program.
<LI> Conditional compilation. Using special preprocessing directives, you can include or exclude parts of the
program according to various conditions.
<LI> Line control. If you use a program to combine or rearrange source files into an intermediate file which is then
compiled, you can use line control to inform the compiler of where each source line originally came from.
</UL>
<P>C preprocessors vary in some details. For a full explanation of the GNU C preprocessor, see the
info file cpp.info, or the manual The C
Preprocessor . Both of these are built from the same documentation source file,
cpp.texinfo. The GNU C preprocessor provides a superset of the features of ANSI Standard C.
</P>
<P>ANSI Standard C requires the rejection of many harmless constructs commonly used by today's C programs.
Such incompatibility would be inconvenient for users, so the GNU C preprocessor is configured to accept these constructs
by default. Strictly speaking, to get ANSI Standard C, you must use the options
_trigraphs, _undef, and _pedantic, but in practice the consequences of having strict ANSI Standard C make it undesirable to do this.
</P>
<P>When you use the C preprocessor, you will usually not have to invoke it explicitly: the C compiler will do so
automatically. However, the preprocessor is sometimes useful individually.
</P>
<P>When you call the preprocessor individually, either name
(cpp or cccp) will do; they are completely synonymous.
</P>
<A NAME="PAGENUM-82"><P>Page 82</P></A>
<P>The C preprocessor expects two filenames as arguments,
infile and outfile. The preprocessor reads infile together
with any other files it specifies with #include. All the output generated by the combined input files is written in
outfile. Either infile or outfile may be _, which as
infile means to read from standard input and as
outfile means to write to standard output. Also, if
outfile or both filenames are omitted, the standard output and standard input are used for the
omitted filenames.
</P>
<P><B>
OPTIONS
</B></P>
<P>Here is a table of command options accepted by the C preprocessor. These options can also be given when compiling a
C program; they are passed along automatically to the preprocessor when it is invoked by the compiler.
</P>
<TABLE>
<TR><TD>
_P
</TD><TD>
Inhibit generation of # lines with line-number information in the output from the
preprocessor. This might be useful when running the preprocessor on something that is not C code and will
be sent to a program which might be confused by the
# lines.
</TD></TR><TR><TD>
_C
</TD><TD>
Do not discard comments: pass them through to the output file. Comments appearing
in arguments of a macro call will be copied to the output before the expansion of the macro call.
</TD></TR><TR><TD>
<P>_traditional
</TD><TD>
Try to imitate the behavior of old-fashioned C, as opposed to ANSI C.
</TD></TR><TR><TD>
_trigraphs
</TD><TD>
Process ANSI standard trigraph sequences. These are three-character sequences, all starting with
??, that are defined by ANSI C to stand for single characters. For example,
??/ stands for \, so ??/n is a character constant for a newline. Strictly speaking, the GNU C preprocessor does not support
all programs in ANSI Standard C unless _trigraphs is used, but if you ever notice the difference,
it will be with relief. You don't want to know any more about trigraphs.
</TD></TR><TR><TD>
_pedantic
</TD><TD>
Issue warnings required by the ANSI C standard in certain cases such as when text other than
a comment follows #else or #endif.
</TD></TR><TR><TD>
_pedantic_errors
</TD><TD>
Like _pedantic, except that errors are produced rather than warnings.
</TD></TR><TR><TD>
_Wtrigraphs
</TD><TD>
Warn if any trigraphs are encountered (assuming they are enabled).
</TD></TR><TR><TD>
_Wcomment
</TD><TD>
Warn whenever a comment-start sequence
/* appears in a comment. (Both forms have the
</TD></TR><TR><TD>
_Wcomments
</TD><TD>
same effect.)
</TD></TR><TR><TD>
_Wall
</TD><TD>
Requests both _Wtrigraphs and
_Wcomment (but not _Wtraditional).
</TD></TR><TR><TD>
_Wtraditional
</TD><TD>
Warn about certain constructs that behave differently in traditional and ANSI C.
</TD></TR><TR><TD>
_I directory
</TD><TD>
Add the directory directory to the end of the list of directories to be searched for header files.
This can be used to override a system header file, substituting your own version, since these
directories are searched before the system header file directories. If you use more than one
_I option, the directories are scanned in left-to-right order; the standard system directories come after.
</TD></TR><TR><TD>
_I_
</TD><TD>
Any directories specified with _I options before the
_I_ option are searched only for the case of #include " file
"; they are not searched for #include < file
>.
</TD></TR><TR><TD>
</TD><TD>
If additional directories are specified with
_I options after the _I_, these directories are searched
for all #include directives.
</TD></TR><TR><TD>
</TD><TD>
In addition, the _I_ option inhibits the use of the current directory as the first search directory
for #include " file ". Therefore, the current directory is searched only if it is requested explicitly
with _I followed by a period (.). Specifying both
_I_ and _I. allows you to control precisely which directories are searched before the current one and which are searched after.
</TD></TR><TR><TD>
_nostdinc
</TD><TD>
Do not search the standard system directories for header files. Only the directories you
have specified with _I options (and the current directory, if appropriate) are searched.
</TD></TR><TR><TD>
_nostdinc++
</TD><TD>
Do not search for header files in the C++-specific standard directories, but do still search the
other standard directories. (This option is used when building
libg++.)
</TD></TR><TR><TD>
_D name
</TD><TD>
Predefine name as a macro, with definition
1.
</TD></TR><TR><TD>
_D name=definition
</TD><TD>
Predefine name as a macro, with definition
definition. There are no restrictions on the contents
of definition, but if you are invoking the preprocessor from a shell or shell-like program, you
may need to use the shell's quoting syntax to protect characters such as spaces that have a meaning
in the shell syntax. If you use more than one _D for the same name, the rightmost definition
takes effect.
</TD></TR></TABLE>
<P><CENTER>
<a href="0078-0080.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0083-0083.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -