cpp.1 (171826) | cpp.1 (220755) |
---|---|
1.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 2.\" 3.\" Standard preamble: 4.\" ======================================================================== 5.de Sh \" Subsection heading 6.br 7.if t .Sp 8.ne 5 --- 139 unchanged lines hidden (view full) --- 148.SH "DESCRIPTION" 149.IX Header "DESCRIPTION" 150The C preprocessor, often known as \fIcpp\fR, is a \fImacro processor\fR 151that is used automatically by the C compiler to transform your program 152before compilation. It is called a macro processor because it allows 153you to define \fImacros\fR, which are brief abbreviations for longer 154constructs. 155.PP | 1.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 2.\" 3.\" Standard preamble: 4.\" ======================================================================== 5.de Sh \" Subsection heading 6.br 7.if t .Sp 8.ne 5 --- 139 unchanged lines hidden (view full) --- 148.SH "DESCRIPTION" 149.IX Header "DESCRIPTION" 150The C preprocessor, often known as \fIcpp\fR, is a \fImacro processor\fR 151that is used automatically by the C compiler to transform your program 152before compilation. It is called a macro processor because it allows 153you to define \fImacros\fR, which are brief abbreviations for longer 154constructs. 155.PP |
156The C preprocessor is intended to be used only with C, \*(C+, and 157Objective-C source code. In the past, it has been abused as a general 158text processor. It will choke on input which does not obey C's lexical 159rules. For example, apostrophes will be interpreted as the beginning of 160character constants, and cause errors. Also, you cannot rely on it 161preserving characteristics of the input which are not significant to 162C\-family languages. If a Makefile is preprocessed, all the hard tabs 163will be removed, and the Makefile will not work. | 156The C preprocessor is intended to be used only with C and \*(C+ source 157code. In the past, it has been abused as a general text processor. It 158will choke on input which does not obey C's lexical rules. For 159example, apostrophes will be interpreted as the beginning of character 160constants, and cause errors. Also, you cannot rely on it preserving 161characteristics of the input which are not significant to C\-family 162languages. If a Makefile is preprocessed, all the hard tabs will be 163removed, and the Makefile will not work. |
164.PP 165Having said that, you can often get away with using cpp on things which 166are not C. Other Algol-ish programming languages are often safe 167(Pascal, Ada, etc.) So is assembly, with caution. \fB\-traditional\-cpp\fR 168mode preserves more white space, and is otherwise more permissive. Many 169of the problems can be avoided by writing C or \*(C+ style comments 170instead of native language comments, and keeping macros simple. 171.PP --- 305 unchanged lines hidden (view full) --- 477.IX Item "-MMD" 478Like \fB\-MD\fR except mention only user header files, not system 479header files. 480.IP "\fB\-x c\fR" 4 481.IX Item "-x c" 482.PD 0 483.IP "\fB\-x c++\fR" 4 484.IX Item "-x c++" | 164.PP 165Having said that, you can often get away with using cpp on things which 166are not C. Other Algol-ish programming languages are often safe 167(Pascal, Ada, etc.) So is assembly, with caution. \fB\-traditional\-cpp\fR 168mode preserves more white space, and is otherwise more permissive. Many 169of the problems can be avoided by writing C or \*(C+ style comments 170instead of native language comments, and keeping macros simple. 171.PP --- 305 unchanged lines hidden (view full) --- 477.IX Item "-MMD" 478Like \fB\-MD\fR except mention only user header files, not system 479header files. 480.IP "\fB\-x c\fR" 4 481.IX Item "-x c" 482.PD 0 483.IP "\fB\-x c++\fR" 4 484.IX Item "-x c++" |
485.IP "\fB\-x objective-c\fR" 4 486.IX Item "-x objective-c" | |
487.IP "\fB\-x assembler-with-cpp\fR" 4 488.IX Item "-x assembler-with-cpp" 489.PD | 485.IP "\fB\-x assembler-with-cpp\fR" 4 486.IX Item "-x assembler-with-cpp" 487.PD |
490Specify the source language: C, \*(C+, Objective\-C, or assembly. This has 491nothing to do with standards conformance or extensions; it merely 492selects which base syntax to expect. If you give none of these options, 493cpp will deduce the language from the extension of the source file: 494\&\fB.c\fR, \fB.cc\fR, \fB.m\fR, or \fB.S\fR. Some other common 495extensions for \*(C+ and assembly are also recognized. If cpp does not 496recognize the extension, it will treat the file as C; this is the most 497generic mode. | 488Specify the source language: C, \*(C+, or assembly. This has nothing 489to do with standards conformance or extensions; it merely selects which 490base syntax to expect. If you give none of these options, cpp will 491deduce the language from the extension of the source file: \&\fB.c\fR, 492\fB.cc\fR, or \fB.S\fR. Some other common extensions for \*(C+ and 493assembly are also recognized. If cpp does not recognize the extension, 494it will treat the file as C; this is the most generic mode. |
498.Sp 499\&\fINote:\fR Previous versions of cpp accepted a \fB\-lang\fR option 500which selected both the language and the standards conformance level. 501This option has been removed, because it conflicts with the \fB\-l\fR 502option. 503.IP "\fB\-std=\fR\fIstandard\fR" 4 504.IX Item "-std=standard" 505.PD 0 --- 343 unchanged lines hidden (view full) --- 849configuration of \s-1GCC\s0. 850.IP "\fB\s-1CPATH\s0\fR" 4 851.IX Item "CPATH" 852.PD 0 853.IP "\fBC_INCLUDE_PATH\fR" 4 854.IX Item "C_INCLUDE_PATH" 855.IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4 856.IX Item "CPLUS_INCLUDE_PATH" | 495.Sp 496\&\fINote:\fR Previous versions of cpp accepted a \fB\-lang\fR option 497which selected both the language and the standards conformance level. 498This option has been removed, because it conflicts with the \fB\-l\fR 499option. 500.IP "\fB\-std=\fR\fIstandard\fR" 4 501.IX Item "-std=standard" 502.PD 0 --- 343 unchanged lines hidden (view full) --- 846configuration of \s-1GCC\s0. 847.IP "\fB\s-1CPATH\s0\fR" 4 848.IX Item "CPATH" 849.PD 0 850.IP "\fBC_INCLUDE_PATH\fR" 4 851.IX Item "C_INCLUDE_PATH" 852.IP "\fB\s-1CPLUS_INCLUDE_PATH\s0\fR" 4 853.IX Item "CPLUS_INCLUDE_PATH" |
857.IP "\fB\s-1OBJC_INCLUDE_PATH\s0\fR" 4 858.IX Item "OBJC_INCLUDE_PATH" | |
859.PD 860Each variable's value is a list of directories separated by a special 861character, much like \fB\s-1PATH\s0\fR, in which to look for header files. 862The special character, \f(CW\*(C`PATH_SEPARATOR\*(C'\fR, is target-dependent and 863determined at \s-1GCC\s0 build time. For Microsoft Windows-based targets it is a 864semicolon, and for almost all other targets it is a colon. 865.Sp 866\&\fB\s-1CPATH\s0\fR specifies a list of directories to be searched as if --- 68 unchanged lines hidden --- | 854.PD 855Each variable's value is a list of directories separated by a special 856character, much like \fB\s-1PATH\s0\fR, in which to look for header files. 857The special character, \f(CW\*(C`PATH_SEPARATOR\*(C'\fR, is target-dependent and 858determined at \s-1GCC\s0 build time. For Microsoft Windows-based targets it is a 859semicolon, and for almost all other targets it is a colon. 860.Sp 861\&\fB\s-1CPATH\s0\fR specifies a list of directories to be searched as if --- 68 unchanged lines hidden --- |