2001-01-03 21:15:01 +01:00
|
|
|
.\" Automatically generated by Pod::Man version 1.1
|
Version.c, [...]: Update G77 version number to 0.5.27.
libf2c:
* libF77/Version.c, libI77/Version.c, libU77/Version.c: Update G77
version number to 0.5.27.
gcc:
* README, cpp.texi, gcc.texi, version.c: Update version number to
3.1.
* cpp.1, gcov.1, gcc.1: Regenerate.
gcc/f:
* version.c, root.texi: Update GCC version number to 3.1. Update
G77 version number to 0.5.27.
* BUGS, NEWS: Regenerate.
From-SVN: r39901
2001-02-19 21:03:42 +01:00
|
|
|
.\" Mon Feb 19 19:32:17 2001
|
2001-01-03 21:15:01 +01:00
|
|
|
.\"
|
|
|
|
.\" Standard preamble:
|
|
|
|
.\" ======================================================================
|
|
|
|
.de Sh \" Subsection heading
|
1999-06-14 19:21:46 +02:00
|
|
|
.br
|
|
|
|
.if t .Sp
|
|
|
|
.ne 5
|
|
|
|
.PP
|
|
|
|
\fB\\$1\fR
|
|
|
|
.PP
|
|
|
|
..
|
2001-01-03 21:15:01 +01:00
|
|
|
.de Sp \" Vertical space (when we can't use .PP)
|
1999-06-14 19:21:46 +02:00
|
|
|
.if t .sp .5v
|
|
|
|
.if n .sp
|
|
|
|
..
|
2001-01-03 21:15:01 +01:00
|
|
|
.de Ip \" List item
|
1999-06-14 19:21:46 +02:00
|
|
|
.br
|
|
|
|
.ie \\n(.$>=3 .ne \\$3
|
|
|
|
.el .ne 3
|
|
|
|
.IP "\\$1" \\$2
|
|
|
|
..
|
2001-01-03 21:15:01 +01:00
|
|
|
.de Vb \" Begin verbatim text
|
1999-06-14 19:21:46 +02:00
|
|
|
.ft CW
|
|
|
|
.nf
|
|
|
|
.ne \\$1
|
|
|
|
..
|
2001-01-03 21:15:01 +01:00
|
|
|
.de Ve \" End verbatim text
|
1999-06-14 19:21:46 +02:00
|
|
|
.ft R
|
|
|
|
|
|
|
|
.fi
|
|
|
|
..
|
2001-01-03 21:15:01 +01:00
|
|
|
.\" Set up some character translations and predefined strings. \*(-- will
|
|
|
|
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
|
|
|
.\" double quote, and \*(R" will give a right double quote. | will give a
|
|
|
|
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used
|
|
|
|
.\" to do unbreakable dashes and therefore won't be available. \*(C` and
|
|
|
|
.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
|
1999-06-14 19:21:46 +02:00
|
|
|
.tr \(*W-|\(bv\*(Tr
|
2001-01-03 21:15:01 +01:00
|
|
|
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
1999-06-14 19:21:46 +02:00
|
|
|
.ie n \{\
|
2001-01-03 21:15:01 +01:00
|
|
|
. ds -- \(*W-
|
|
|
|
. ds PI pi
|
|
|
|
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
|
|
|
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
|
|
|
. ds L" ""
|
|
|
|
. ds R" ""
|
|
|
|
. ds C` ""
|
|
|
|
. ds C' ""
|
1999-06-14 19:21:46 +02:00
|
|
|
'br\}
|
|
|
|
.el\{\
|
2001-01-03 21:15:01 +01:00
|
|
|
. ds -- \|\(em\|
|
|
|
|
. ds PI \(*p
|
|
|
|
. ds L" ``
|
|
|
|
. ds R" ''
|
1999-06-14 19:21:46 +02:00
|
|
|
'br\}
|
2001-01-03 21:15:01 +01:00
|
|
|
.\"
|
|
|
|
.\" If the F register is turned on, we'll generate index entries on stderr
|
|
|
|
.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
|
|
|
|
.\" index entries marked with X<> in POD. Of course, you'll have to process
|
|
|
|
.\" the output yourself in some meaningful fashion.
|
|
|
|
.if \nF \{\
|
|
|
|
. de IX
|
|
|
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
1999-06-14 19:21:46 +02:00
|
|
|
..
|
2001-01-03 21:15:01 +01:00
|
|
|
. nr % 0
|
|
|
|
. rr F
|
|
|
|
.\}
|
|
|
|
.\"
|
|
|
|
.\" For nroff, turn off justification. Always turn off hyphenation; it
|
|
|
|
.\" makes way too many mistakes in technical documents.
|
|
|
|
.hy 0
|
|
|
|
.if n .na
|
|
|
|
.\"
|
|
|
|
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
|
|
|
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
1999-06-14 19:21:46 +02:00
|
|
|
.bd B 3
|
2001-01-03 21:15:01 +01:00
|
|
|
. \" fudge factors for nroff and troff
|
1999-06-14 19:21:46 +02:00
|
|
|
.if n \{\
|
2001-01-03 21:15:01 +01:00
|
|
|
. ds #H 0
|
|
|
|
. ds #V .8m
|
|
|
|
. ds #F .3m
|
|
|
|
. ds #[ \f1
|
|
|
|
. ds #] \fP
|
1999-06-14 19:21:46 +02:00
|
|
|
.\}
|
|
|
|
.if t \{\
|
2001-01-03 21:15:01 +01:00
|
|
|
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
|
|
|
. ds #V .6m
|
|
|
|
. ds #F 0
|
|
|
|
. ds #[ \&
|
|
|
|
. ds #] \&
|
1999-06-14 19:21:46 +02:00
|
|
|
.\}
|
2001-01-03 21:15:01 +01:00
|
|
|
. \" simple accents for nroff and troff
|
1999-06-14 19:21:46 +02:00
|
|
|
.if n \{\
|
2001-01-03 21:15:01 +01:00
|
|
|
. ds ' \&
|
|
|
|
. ds ` \&
|
|
|
|
. ds ^ \&
|
|
|
|
. ds , \&
|
|
|
|
. ds ~ ~
|
|
|
|
. ds /
|
1999-06-14 19:21:46 +02:00
|
|
|
.\}
|
|
|
|
.if t \{\
|
2001-01-03 21:15:01 +01:00
|
|
|
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
|
|
|
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
|
|
|
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
|
|
|
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
|
|
|
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
|
|
|
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
1999-06-14 19:21:46 +02:00
|
|
|
.\}
|
2001-01-03 21:15:01 +01:00
|
|
|
. \" troff and (daisy-wheel) nroff accents
|
1999-06-14 19:21:46 +02:00
|
|
|
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
|
|
|
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
|
|
|
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
|
|
|
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
|
|
|
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
|
|
|
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
|
|
|
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
|
|
|
.ds ae a\h'-(\w'a'u*4/10)'e
|
|
|
|
.ds Ae A\h'-(\w'A'u*4/10)'E
|
2001-01-03 21:15:01 +01:00
|
|
|
. \" corrections for vroff
|
1999-06-14 19:21:46 +02:00
|
|
|
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
|
|
|
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
2001-01-03 21:15:01 +01:00
|
|
|
. \" for low resolution devices (crt and lpr)
|
1999-06-14 19:21:46 +02:00
|
|
|
.if \n(.H>23 .if \n(.V>19 \
|
|
|
|
\{\
|
2001-01-03 21:15:01 +01:00
|
|
|
. ds : e
|
|
|
|
. ds 8 ss
|
|
|
|
. ds o a
|
|
|
|
. ds d- d\h'-1'\(ga
|
|
|
|
. ds D- D\h'-1'\(hy
|
|
|
|
. ds th \o'bp'
|
|
|
|
. ds Th \o'LP'
|
|
|
|
. ds ae ae
|
|
|
|
. ds Ae AE
|
1999-06-14 19:21:46 +02:00
|
|
|
.\}
|
|
|
|
.rm #[ #] #H #V #F C
|
2001-01-03 21:15:01 +01:00
|
|
|
.\" ======================================================================
|
|
|
|
.\"
|
|
|
|
.IX Title "CPP 1"
|
Version.c, [...]: Update G77 version number to 0.5.27.
libf2c:
* libF77/Version.c, libI77/Version.c, libU77/Version.c: Update G77
version number to 0.5.27.
gcc:
* README, cpp.texi, gcc.texi, version.c: Update version number to
3.1.
* cpp.1, gcov.1, gcc.1: Regenerate.
gcc/f:
* version.c, root.texi: Update GCC version number to 3.1. Update
G77 version number to 0.5.27.
* BUGS, NEWS: Regenerate.
From-SVN: r39901
2001-02-19 21:03:42 +01:00
|
|
|
.TH CPP 1 "gcc-3.1" "2001-02-19" "GNU"
|
2001-01-03 21:15:01 +01:00
|
|
|
.UC
|
1999-06-14 19:21:46 +02:00
|
|
|
.SH "NAME"
|
|
|
|
cpp \- The C Preprocessor
|
|
|
|
.SH "SYNOPSIS"
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Header "SYNOPSIS"
|
1999-06-14 19:21:46 +02:00
|
|
|
cpp [\fB\-P\fR] [\fB\-C\fR] [\fB\-gcc\fR] [\fB\-traditional\fR]
|
|
|
|
[\fB\-undef\fR] [\fB\-trigraphs\fR] [\fB\-pedantic\fR]
|
|
|
|
[\fB\-W\fR\fIwarn\fR...] [\fB\-I\fR\fIdir\fR...]
|
|
|
|
[\fB\-D\fR\fImacro\fR[=\fIdefn\fR]...] [\fB\-U\fR\fImacro\fR]
|
|
|
|
[\fB\-A\fR\fIpredicate\fR(\fIanswer\fR)]
|
2001-01-12 19:51:27 +01:00
|
|
|
[\fB\-M\fR|\fB\-MM\fR][\fB\-MG\fR][\fB\-MF\fR\fIfilename\fR]
|
|
|
|
[\fB\-MP\fR][\fB\-MQ\fR\fItarget\fR...][\fB\-MT\fR\fItarget\fR...]
|
1999-06-14 19:21:46 +02:00
|
|
|
[\fB\-x\fR \fIlanguage\fR] [\fB\-std=\fR\fIstandard\fR]
|
|
|
|
\fIinfile\fR \fIoutfile\fR
|
|
|
|
.PP
|
|
|
|
Only the most useful options are listed here; see below for the remainder.
|
|
|
|
.SH "DESCRIPTION"
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Header "DESCRIPTION"
|
2000-08-02 09:08:49 +02:00
|
|
|
The C preprocessor is a \fImacro processor\fR 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
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fImacros\fR, which are brief abbreviations for longer constructs.
|
1999-06-14 19:21:46 +02:00
|
|
|
.PP
|
2000-08-02 09:08:49 +02:00
|
|
|
The C preprocessor is intended only for macro processing of C, \*(C+ and
|
|
|
|
Objective C source files. For macro processing of other files, you are
|
|
|
|
strongly encouraged to use alternatives like M4, which will likely give
|
|
|
|
you better results and avoid many problems. For example, normally the C
|
|
|
|
preprocessor does not preserve arbitrary whitespace verbatim, but
|
|
|
|
instead replaces each sequence with a single space.
|
|
|
|
.PP
|
2001-01-03 21:15:01 +01:00
|
|
|
For use on C-like source files, the C preprocessor provides four
|
2000-08-02 09:08:49 +02:00
|
|
|
separate facilities that you can use as you see fit:
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\(bu" 4
|
|
|
|
Inclusion of header files. These are files of declarations that can be
|
|
|
|
substituted into your program.
|
|
|
|
.Ip "\(bu" 4
|
|
|
|
Macro expansion. You can define \fImacros\fR, which are abbreviations
|
|
|
|
for arbitrary fragments of C code, and then the C preprocessor will
|
|
|
|
replace the macros with their definitions throughout the program.
|
|
|
|
.Ip "\(bu" 4
|
|
|
|
Conditional compilation. Using special preprocessing directives, you
|
|
|
|
can include or exclude parts of the program according to various
|
|
|
|
conditions.
|
|
|
|
.Ip "\(bu" 4
|
2000-08-02 09:08:49 +02:00
|
|
|
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.
|
1999-06-14 19:21:46 +02:00
|
|
|
.PP
|
|
|
|
C preprocessors vary in some details. This manual discusses the \s-1GNU\s0 C
|
2000-08-02 09:08:49 +02:00
|
|
|
preprocessor, which provides a small superset of the features of \s-1ISO\s0
|
|
|
|
Standard C.
|
1999-06-14 19:21:46 +02:00
|
|
|
.PP
|
2000-08-02 09:08:49 +02:00
|
|
|
In its default mode, the \s-1GNU\s0 C preprocessor does not do a few things
|
|
|
|
required by the standard. These are features which are rarely, if ever,
|
|
|
|
used, and may cause surprising changes to the meaning of a program which
|
|
|
|
does not expect them. To get strict \s-1ISO\s0 Standard C, you should use the
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fB\-std=c89\fR or \fB\-std=c99\fR options, depending on which version
|
2000-08-02 09:08:49 +02:00
|
|
|
of the standard you want. To get all the mandatory diagnostics, you
|
|
|
|
must also use \fB\-pedantic\fR.
|
1999-06-14 19:21:46 +02:00
|
|
|
.SH "OPTIONS"
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Header "OPTIONS"
|
1999-06-14 19:21:46 +02:00
|
|
|
The C preprocessor expects two file names as arguments, \fIinfile\fR and
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fIoutfile\fR. The preprocessor reads \fIinfile\fR together with any
|
2000-08-02 09:08:49 +02:00
|
|
|
other files it specifies with \fB#include\fR. All the output generated
|
|
|
|
by the combined input files is written in \fIoutfile\fR.
|
1999-06-14 19:21:46 +02:00
|
|
|
.PP
|
2001-01-03 21:15:01 +01:00
|
|
|
Either \fIinfile\fR or \fIoutfile\fR may be \fB-\fR, which as
|
|
|
|
\&\fIinfile\fR means to read from standard input and as \fIoutfile\fR
|
1999-06-14 19:21:46 +02:00
|
|
|
means to write to standard output. Also, if either file is omitted, it
|
2001-01-03 21:15:01 +01:00
|
|
|
means the same as if \fB-\fR had been specified for that file.
|
1999-06-14 19:21:46 +02:00
|
|
|
.PP
|
|
|
|
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.
|
|
|
|
.Ip "\fB\-P\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-P"
|
2000-08-02 09:08:49 +02:00
|
|
|
Inhibit generation of \fB#\fR\-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 \fB#\fR\-lines.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-C\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-C"
|
2000-08-02 09:08:49 +02:00
|
|
|
Do not discard comments. All comments are passed through to the output
|
|
|
|
file, except for comments in processed directives, which are deleted
|
|
|
|
along with the directive. Comments appearing in the expansion list of a
|
|
|
|
macro will be preserved, and appear in place wherever the macro is
|
|
|
|
invoked.
|
|
|
|
.Sp
|
|
|
|
You should be prepared for side effects when using \fB\-C\fR; it causes
|
|
|
|
the preprocessor to treat comments as tokens in their own right. For
|
|
|
|
example, macro redefinitions that were trivial when comments were
|
|
|
|
replaced by a single space might become significant when comments are
|
|
|
|
retained. Also, comments appearing at the start of what would be a
|
|
|
|
directive line have the effect of turning that line into an ordinary
|
|
|
|
source line, since the first token on the line is no longer a \fB#\fR.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-traditional\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-traditional"
|
2000-08-02 09:08:49 +02:00
|
|
|
Try to imitate the behavior of old-fashioned C, as opposed to \s-1ISO\s0 C.
|
|
|
|
.RS 4
|
|
|
|
.Ip "\(bu" 4
|
|
|
|
Traditional macro expansion pays no attention to single-quote or
|
|
|
|
double-quote characters; macro argument symbols are replaced by the
|
1999-06-14 19:21:46 +02:00
|
|
|
argument values even when they appear within apparent string or
|
|
|
|
character constants.
|
2000-08-02 09:08:49 +02:00
|
|
|
.Ip "\(bu" 4
|
1999-06-14 19:21:46 +02:00
|
|
|
Traditionally, it is permissible for a macro expansion to end in the
|
|
|
|
middle of a string or character constant. The constant continues into
|
|
|
|
the text surrounding the macro call.
|
2000-08-02 09:08:49 +02:00
|
|
|
.Ip "\(bu" 4
|
1999-06-14 19:21:46 +02:00
|
|
|
However, traditionally the end of the line terminates a string or
|
|
|
|
character constant, with no error.
|
2000-08-02 09:08:49 +02:00
|
|
|
.Ip "\(bu" 4
|
|
|
|
In traditional C, a comment is equivalent to no text at all. (In \s-1ISO\s0
|
1999-06-14 19:21:46 +02:00
|
|
|
C, a comment counts as whitespace.)
|
2000-08-02 09:08:49 +02:00
|
|
|
.Ip "\(bu" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
Traditional C does not have the concept of a ``preprocessing number''.
|
1999-06-14 19:21:46 +02:00
|
|
|
It considers \fB1.0e+4\fR to be three tokens: \fB1.0e\fR, \fB+\fR,
|
|
|
|
and \fB4\fR.
|
2000-08-02 09:08:49 +02:00
|
|
|
.Ip "\(bu" 4
|
1999-06-14 19:21:46 +02:00
|
|
|
A macro is not suppressed within its own definition, in traditional C.
|
|
|
|
Thus, any macro that is used recursively inevitably causes an error.
|
2000-08-02 09:08:49 +02:00
|
|
|
.Ip "\(bu" 4
|
1999-06-14 19:21:46 +02:00
|
|
|
The character \fB#\fR has no special meaning within a macro definition
|
|
|
|
in traditional C.
|
2000-08-02 09:08:49 +02:00
|
|
|
.Ip "\(bu" 4
|
1999-06-14 19:21:46 +02:00
|
|
|
In traditional C, the text at the end of a macro expansion can run
|
|
|
|
together with the text after the macro call, to produce a single token.
|
2000-08-02 09:08:49 +02:00
|
|
|
(This is impossible in \s-1ISO\s0 C.)
|
|
|
|
.Ip "\(bu" 4
|
|
|
|
None of the \s-1GNU\s0 extensions to the preprocessor are available in
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fB\-traditional\fR mode.
|
2000-08-02 09:08:49 +02:00
|
|
|
.RE
|
2001-01-03 21:15:01 +01:00
|
|
|
.RS 4
|
|
|
|
.Sp
|
2000-08-02 09:08:49 +02:00
|
|
|
Use the \fB\-traditional\fR option when preprocessing Fortran code, so
|
|
|
|
that single-quotes and double-quotes within Fortran comment lines (which
|
|
|
|
are generally not recognized as such by the preprocessor) do not cause
|
|
|
|
diagnostics about unterminated character or string constants.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Sp
|
2000-08-02 09:08:49 +02:00
|
|
|
However, this option does not prevent diagnostics about unterminated
|
2001-01-03 21:15:01 +01:00
|
|
|
comments when a C-style comment appears to start, but not end, within
|
2000-08-02 09:08:49 +02:00
|
|
|
Fortran-style commentary.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Sp
|
|
|
|
So, the following Fortran comment lines are accepted with
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fB\-traditional\fR:
|
1999-06-14 19:21:46 +02:00
|
|
|
.Sp
|
|
|
|
.Vb 3
|
|
|
|
\& C This isn't an unterminated character constant
|
|
|
|
\& C Neither is "20000000000, an octal constant
|
|
|
|
\& C in some dialects of Fortran
|
|
|
|
.Ve
|
2000-08-02 09:08:49 +02:00
|
|
|
However, this type of comment line will likely produce a diagnostic, or
|
|
|
|
at least unexpected output from the preprocessor, due to the
|
|
|
|
unterminated comment:
|
1999-06-14 19:21:46 +02:00
|
|
|
.Sp
|
|
|
|
.Vb 2
|
|
|
|
\& C Some Fortran compilers accept /* as starting
|
|
|
|
\& C an inline comment.
|
|
|
|
.Ve
|
2001-01-03 21:15:01 +01:00
|
|
|
Note that \f(CW\*(C`g77\*(C'\fR automatically supplies the \fB\-traditional\fR
|
2000-08-02 09:08:49 +02:00
|
|
|
option when it invokes the preprocessor. However, a future version of
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\f(CW\*(C`g77\*(C'\fR might use a different, more-Fortran-aware preprocessor in
|
|
|
|
place of \f(CW\*(C`cpp\*(C'\fR.
|
|
|
|
.RE
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-trigraphs\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-trigraphs"
|
2000-08-02 09:08:49 +02:00
|
|
|
Process \s-1ISO\s0 standard trigraph sequences. These are three-character
|
|
|
|
sequences, all starting with \fB??\fR, that are defined by \s-1ISO\s0 C to
|
1999-06-14 19:21:46 +02:00
|
|
|
stand for single characters. For example, \fB??/\fR stands for
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fB\e\fR, so \fB'??/n'\fR is a character constant for a newline. By
|
2000-08-02 09:08:49 +02:00
|
|
|
default, \s-1GCC\s0 ignores trigraphs, but in standard-conforming modes it
|
|
|
|
converts them. See the \fB\-std\fR option.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Sp
|
2000-08-02 09:08:49 +02:00
|
|
|
The nine trigraph sequences are
|
|
|
|
.RS 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.Ip "\fB??(\fR" 4
|
|
|
|
.IX Item "??("
|
|
|
|
-> \fB[\fR
|
|
|
|
.Ip "\fB??)\fR" 4
|
|
|
|
.IX Item "??)"
|
|
|
|
-> \fB]\fR
|
|
|
|
.Ip "\fB??<\fR" 4
|
|
|
|
.IX Item "??<"
|
|
|
|
-> \fB{\fR
|
|
|
|
.Ip "\fB??>\fR" 4
|
|
|
|
.IX Item "??>"
|
|
|
|
-> \fB}\fR
|
|
|
|
.Ip "\fB??=\fR" 4
|
|
|
|
.IX Item "??="
|
|
|
|
-> \fB#\fR
|
|
|
|
.Ip "\fB??/\fR" 4
|
|
|
|
.IX Item "??/"
|
|
|
|
-> \fB\e\fR
|
|
|
|
.Ip "\fB??'\fR" 4
|
|
|
|
.IX Item "??'"
|
|
|
|
-> \fB^\fR
|
|
|
|
.Ip "\fB??!\fR" 4
|
|
|
|
.IX Item "??!"
|
|
|
|
-> \fB|\fR
|
|
|
|
.Ip "\fB??-\fR" 4
|
|
|
|
.IX Item "??-"
|
|
|
|
-> \fB~\fR
|
2000-08-02 09:08:49 +02:00
|
|
|
.RE
|
2001-01-03 21:15:01 +01:00
|
|
|
.RS 4
|
|
|
|
.Sp
|
2000-08-02 09:08:49 +02:00
|
|
|
Trigraph support is not popular, so many compilers do not implement it
|
|
|
|
properly. Portable code should not rely on trigraphs being either
|
|
|
|
converted or ignored.
|
2001-01-03 21:15:01 +01:00
|
|
|
.RE
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-pedantic\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-pedantic"
|
2000-08-02 09:08:49 +02:00
|
|
|
Issue warnings required by the \s-1ISO\s0 C standard in certain cases such
|
1999-06-14 19:21:46 +02:00
|
|
|
as when text other than a comment follows \fB#else\fR or \fB#endif\fR.
|
|
|
|
.Ip "\fB\-pedantic-errors\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-pedantic-errors"
|
1999-06-14 19:21:46 +02:00
|
|
|
Like \fB\-pedantic\fR, except that errors are produced rather than
|
|
|
|
warnings.
|
|
|
|
.Ip "\fB\-Wcomment\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-Wcomment"
|
|
|
|
.PD 0
|
2000-08-02 09:08:49 +02:00
|
|
|
.Ip "\fB\-Wcomments\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-Wcomments"
|
|
|
|
.PD
|
2000-08-02 09:08:49 +02:00
|
|
|
(Both forms have the same effect).
|
1999-06-14 19:21:46 +02:00
|
|
|
Warn whenever a comment-start sequence \fB/*\fR appears in a \fB/*\fR
|
2000-08-02 09:08:49 +02:00
|
|
|
comment, or whenever a backslash-newline appears in a \fB//\fR comment.
|
|
|
|
.Ip "\fB\-Wtrigraphs\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-Wtrigraphs"
|
2000-08-02 09:08:49 +02:00
|
|
|
Warn if any trigraphs are encountered. This option used to take effect
|
2001-01-03 21:15:01 +01:00
|
|
|
only if \fB\-trigraphs\fR was also specified, but now works
|
|
|
|
independently. Warnings are not given for trigraphs within comments, as
|
|
|
|
we feel this is obnoxious.
|
2000-08-02 09:08:49 +02:00
|
|
|
.Ip "\fB\-Wwhite-space\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-Wwhite-space"
|
2000-08-02 09:08:49 +02:00
|
|
|
Warn about possible white space confusion, e.g. white space between a
|
|
|
|
backslash and a newline.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-Wall\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-Wall"
|
2000-08-02 09:08:49 +02:00
|
|
|
Requests \fB\-Wcomment\fR, \fB\-Wtrigraphs\fR, and \fB\-Wwhite-space\fR
|
|
|
|
(but not \fB\-Wtraditional\fR or \fB\-Wundef\fR).
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-Wtraditional\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-Wtraditional"
|
1999-06-14 19:21:46 +02:00
|
|
|
Warn about certain constructs that behave differently in traditional and
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\s-1ISO\s0 C.
|
Version.c, [...]: Update G77 version number to 0.5.27.
libf2c:
* libF77/Version.c, libI77/Version.c, libU77/Version.c: Update G77
version number to 0.5.27.
gcc:
* README, cpp.texi, gcc.texi, version.c: Update version number to
3.1.
* cpp.1, gcov.1, gcc.1: Regenerate.
gcc/f:
* version.c, root.texi: Update GCC version number to 3.1. Update
G77 version number to 0.5.27.
* BUGS, NEWS: Regenerate.
From-SVN: r39901
2001-02-19 21:03:42 +01:00
|
|
|
.RS 4
|
|
|
|
.Ip "\(bu" 4
|
|
|
|
Macro parameters that appear within string literals in the macro body.
|
|
|
|
In traditional C macro replacement takes place within string literals,
|
|
|
|
but does not in \s-1ISO\s0 C.
|
|
|
|
.Ip "\(bu" 4
|
|
|
|
In traditional C, some preprocessor directives did not exist.
|
|
|
|
Traditional preprocessors would only consider a line to be a directive
|
|
|
|
if the \fB#\fR appeared in column 1 on the line. Therefore
|
|
|
|
\&\fB\-Wtraditional\fR warns about directives that traditional C
|
|
|
|
understands but would ignore because the \fB#\fR does not appear as the
|
|
|
|
first character on the line. It also suggests you hide directives like
|
|
|
|
\&\fB#pragma\fR not understood by traditional C by indenting them. Some
|
|
|
|
traditional implementations would not recognise \fB#elif\fR, so it
|
|
|
|
suggests avoiding it altogether.
|
|
|
|
.Ip "\(bu" 4
|
|
|
|
A function-like macro that appears without arguments.
|
|
|
|
.Ip "\(bu" 4
|
|
|
|
The unary plus operator.
|
|
|
|
.Ip "\(bu" 4
|
|
|
|
The `U' integer constant suffix. (Traditonal C does support the `L'
|
|
|
|
suffix on integer constants.) Note, these suffixes appear in macros
|
|
|
|
defined in the system headers of most modern systems, e.g. the _MIN/_MAX
|
|
|
|
macros in limits.h. Use of these macros can lead to spurious warnings
|
|
|
|
as they do not necessarily reflect whether the code in question is any
|
|
|
|
less portable to traditional C given that suitable backup definitions
|
|
|
|
are provided.
|
|
|
|
.RE
|
|
|
|
.RS 4
|
|
|
|
.RE
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-Wundef\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-Wundef"
|
1999-06-14 19:21:46 +02:00
|
|
|
Warn if an undefined identifier is evaluated in an \fB#if\fR directive.
|
2001-01-03 21:15:01 +01:00
|
|
|
.Ip "\fB\-I\fR \fIdirectory\fR" 4
|
|
|
|
.IX Item "-I directory"
|
1999-06-14 19:21:46 +02:00
|
|
|
Add the directory \fIdirectory\fR to the head of the list of
|
2001-01-03 21:15:01 +01:00
|
|
|
directories to be searched for header files.
|
1999-06-14 19:21:46 +02:00
|
|
|
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 \fB\-I\fR option,
|
|
|
|
the directories are scanned in left-to-right order; the standard
|
|
|
|
system directories come after.
|
|
|
|
.Ip "\fB\-I-\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-I-"
|
1999-06-14 19:21:46 +02:00
|
|
|
Any directories specified with \fB\-I\fR options before the \fB\-I-\fR
|
2001-01-03 21:15:01 +01:00
|
|
|
option are searched only for the case of \fB#include "\fR\fIfile\fR\fB"\fR;
|
|
|
|
they are not searched for \fB#include <\fR\fIfile\fR\fB>\fR.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Sp
|
|
|
|
If additional directories are specified with \fB\-I\fR options after
|
|
|
|
the \fB\-I-\fR, these directories are searched for all \fB#include\fR
|
|
|
|
directives.
|
|
|
|
.Sp
|
|
|
|
In addition, the \fB\-I-\fR option inhibits the use of the current
|
2001-01-03 21:15:01 +01:00
|
|
|
directory as the first search directory for \fB#include "\fR\fIfile\fR\fB"\fR.
|
1999-06-14 19:21:46 +02:00
|
|
|
Therefore, the current directory is searched only if it is requested
|
|
|
|
explicitly with \fB\-I.\fR. Specifying both \fB\-I-\fR and \fB\-I.\fR
|
|
|
|
allows you to control precisely which directories are searched before
|
|
|
|
the current one and which are searched after.
|
|
|
|
.Ip "\fB\-nostdinc\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-nostdinc"
|
1999-06-14 19:21:46 +02:00
|
|
|
Do not search the standard system directories for header files.
|
|
|
|
Only the directories you have specified with \fB\-I\fR options
|
|
|
|
(and the current directory, if appropriate) are searched.
|
2001-01-12 19:51:27 +01:00
|
|
|
.Sp
|
|
|
|
By using both \fB\-nostdinc\fR and \fB\-I-\fR, you can limit the include-file
|
|
|
|
search path to only those directories you specify explicitly.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-nostdinc++\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-nostdinc++"
|
1999-06-14 19:21:46 +02:00
|
|
|
Do not search for header files in the \*(C+\-specific standard directories,
|
2000-08-02 09:08:49 +02:00
|
|
|
but do still search the other standard directories. (This option is
|
|
|
|
used when building the \*(C+ library.)
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-remap\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-remap"
|
1999-06-14 19:21:46 +02:00
|
|
|
When searching for a header file in a directory, remap file names if a
|
|
|
|
file named \fIheader.gcc\fR exists in that directory. This can be used
|
|
|
|
to work around limitations of file systems with file name restrictions.
|
|
|
|
The \fIheader.gcc\fR file should contain a series of lines with two
|
|
|
|
tokens on each line: the first token is the name to map, and the second
|
|
|
|
token is the actual name to use.
|
2001-01-03 21:15:01 +01:00
|
|
|
.Ip "\fB\-D\fR \fIname\fR" 4
|
|
|
|
.IX Item "-D name"
|
1999-06-14 19:21:46 +02:00
|
|
|
Predefine \fIname\fR as a macro, with definition \fB1\fR.
|
2001-01-03 21:15:01 +01:00
|
|
|
.Ip "\fB\-D\fR \fIname\fR\fB=\fR\fIdefinition\fR" 4
|
|
|
|
.IX Item "-D name=definition"
|
1999-06-14 19:21:46 +02:00
|
|
|
Predefine \fIname\fR as a macro, with definition \fIdefinition\fR.
|
|
|
|
There are no restrictions on the contents of \fIdefinition\fR, 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 \fB\-D\fR for the same \fIname\fR, the rightmost definition takes
|
|
|
|
effect.
|
2001-01-12 19:51:27 +01:00
|
|
|
.Sp
|
|
|
|
Any \fB\-D\fR and \fB\-U\fR options on the command line are processed in
|
|
|
|
order, and always before \fB\-imacros\fR \fIfile\fR, regardless of the
|
|
|
|
order in which they are written.
|
2001-01-03 21:15:01 +01:00
|
|
|
.Ip "\fB\-U\fR \fIname\fR" 4
|
|
|
|
.IX Item "-U name"
|
2001-01-12 19:51:27 +01:00
|
|
|
Do not predefine \fIname\fR.
|
|
|
|
.Sp
|
|
|
|
Any \fB\-D\fR and \fB\-U\fR options on the command line are processed in
|
|
|
|
order, and always before \fB\-imacros\fR \fIfile\fR, regardless of the
|
|
|
|
order in which they are written.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-undef\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-undef"
|
1999-06-14 19:21:46 +02:00
|
|
|
Do not predefine any nonstandard macros.
|
|
|
|
.Ip "\fB\-gcc\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-gcc"
|
2000-02-16 08:54:53 +01:00
|
|
|
Define the macros \fI_\|_GNUC_\|_\fR, \fI_\|_GNUC_MINOR_\|_\fR and
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fI_\|_GNUC_PATCHLEVEL_\|_\fR. These are defined automatically when you use
|
|
|
|
\&\fBgcc \-E\fR; you can turn them off in that case with \fB\-no-gcc\fR.
|
|
|
|
.Ip "\fB\-A\fR \fIpredicate\fR\fB=\fR\fIanswer\fR" 4
|
|
|
|
.IX Item "-A predicate=answer"
|
1999-06-14 19:21:46 +02:00
|
|
|
Make an assertion with the predicate \fIpredicate\fR and answer
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fIanswer\fR. This form is preferred to the older form \fB\-A\fR
|
|
|
|
\&\fIpredicate\fR\fB(\fR\fIanswer\fR\fB)\fR, which is still supported, because
|
|
|
|
it does not use shell special characters.
|
|
|
|
.Ip "\fB\-A -\fR\fIpredicate\fR\fB=\fR\fIanswer\fR" 4
|
|
|
|
.IX Item "-A -predicate=answer"
|
2000-08-02 09:08:49 +02:00
|
|
|
Disable an assertion with the predicate \fIpredicate\fR and answer
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fIanswer\fR. Specifying no predicate, by \fB\-A-\fR or \fB\-A -\fR,
|
2000-08-02 09:08:49 +02:00
|
|
|
disables all predefined assertions and all assertions preceding it on
|
|
|
|
the command line; and also undefines all predefined macros and all
|
|
|
|
macros preceding it on the command line.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-dM\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-dM"
|
1999-06-14 19:21:46 +02:00
|
|
|
Instead of outputting the result of preprocessing, output a list of
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fB#define\fR directives for all the macros defined during the
|
1999-06-14 19:21:46 +02:00
|
|
|
execution of the preprocessor, including predefined macros. This gives
|
|
|
|
you a way of finding out what is predefined in your version of the
|
|
|
|
preprocessor; assuming you have no file \fBfoo.h\fR, the command
|
|
|
|
.Sp
|
|
|
|
.Vb 1
|
|
|
|
\& touch foo.h; cpp -dM foo.h
|
|
|
|
.Ve
|
|
|
|
will show the values of any predefined macros.
|
|
|
|
.Ip "\fB\-dD\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-dD"
|
1999-06-14 19:21:46 +02:00
|
|
|
Like \fB\-dM\fR except in two respects: it does \fInot\fR include the
|
|
|
|
predefined macros, and it outputs \fIboth\fR the \fB#define\fR
|
|
|
|
directives and the result of preprocessing. Both kinds of output go to
|
|
|
|
the standard output file.
|
2000-08-02 09:08:49 +02:00
|
|
|
.Ip "\fB\-dN\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-dN"
|
2000-08-02 09:08:49 +02:00
|
|
|
Like \fB\-dD\fR, but emit only the macro names, not their expansions.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-dI\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-dI"
|
2000-08-02 09:08:49 +02:00
|
|
|
Output \fB#include\fR directives in addition to the result of
|
|
|
|
preprocessing.
|
2001-01-12 19:51:27 +01:00
|
|
|
.Ip "\fB\-M\fR" 4
|
|
|
|
.IX Item "-M"
|
1999-06-14 19:21:46 +02:00
|
|
|
Instead of outputting the result of preprocessing, output a rule
|
2001-01-03 21:15:01 +01:00
|
|
|
suitable for \f(CW\*(C`make\*(C'\fR describing the dependencies of the main source
|
|
|
|
file. The preprocessor outputs one \f(CW\*(C`make\*(C'\fR rule containing the
|
2000-08-02 09:08:49 +02:00
|
|
|
object file name for that source file, a colon, and the names of all the
|
2001-01-24 20:47:47 +01:00
|
|
|
included files, including those coming from \fB\-include\fR or
|
Version.c, [...]: Update G77 version number to 0.5.27.
libf2c:
* libF77/Version.c, libI77/Version.c, libU77/Version.c: Update G77
version number to 0.5.27.
gcc:
* README, cpp.texi, gcc.texi, version.c: Update version number to
3.1.
* cpp.1, gcov.1, gcc.1: Regenerate.
gcc/f:
* version.c, root.texi: Update GCC version number to 3.1. Update
G77 version number to 0.5.27.
* BUGS, NEWS: Regenerate.
From-SVN: r39901
2001-02-19 21:03:42 +01:00
|
|
|
\&\fB\-imacros\fR command line options. Unless specified explicitly (with
|
|
|
|
\&\fB\-MT\fR or \fB\-MQ\fR), the object file name consists of the basename
|
|
|
|
of the source file with any suffix replaced with object file suffix.
|
|
|
|
If there are many included files
|
2001-01-24 20:47:47 +01:00
|
|
|
then the rule is split into several lines using \fB\e\fR\-newline.
|
2001-01-12 19:51:27 +01:00
|
|
|
.Ip "\fB\-MM\fR" 4
|
|
|
|
.IX Item "-MM"
|
|
|
|
Like \fB\-M\fR, but mention only the files included with \fB#include
|
2001-01-24 20:47:47 +01:00
|
|
|
"\fR\fIfile\fR\fB"\fR or with \fB\-include\fR or \fB\-imacros\fR command line
|
|
|
|
options. System header files included with \fB#include <\fR\fIfile\fR\fB>\fR
|
|
|
|
are omitted.
|
2001-01-12 19:51:27 +01:00
|
|
|
.Ip "\fB\-MF\fR \fIfile\fR" 4
|
|
|
|
.IX Item "-MF file"
|
|
|
|
When used with \fB\-M\fR or \fB\-MM\fR, specifies a file to write the
|
|
|
|
dependencies to. This allows the preprocessor to write the preprocessed
|
|
|
|
file to stdout normally. If no \fB\-MF\fR switch is given, \s-1CPP\s0 sends
|
|
|
|
the rules to stdout and suppresses normal preprocessed output.
|
|
|
|
.Ip "\fB\-MG\fR" 4
|
|
|
|
.IX Item "-MG"
|
|
|
|
When used with \fB\-M\fR or \fB\-MM\fR, \fB\-MG\fR says to treat missing
|
|
|
|
header files as generated files and assume they live in the same
|
|
|
|
directory as the source file. It suppresses preprocessed output, as a
|
|
|
|
missing header file is ordinarily an error.
|
|
|
|
.Sp
|
|
|
|
This feature is used in automatic updating of makefiles.
|
|
|
|
.Ip "\fB\-MP\fR" 4
|
|
|
|
.IX Item "-MP"
|
|
|
|
This option instructs \s-1CPP\s0 to add a phony target for each dependency
|
|
|
|
other than the main file, causing each to depend on nothing. These
|
|
|
|
dummy rules work around errors \f(CW\*(C`make\*(C'\fR gives if you remove header
|
|
|
|
files without updating the \f(CW\*(C`Makefile\*(C'\fR to match.
|
|
|
|
.Sp
|
|
|
|
This is typical output:\-
|
|
|
|
.Sp
|
|
|
|
.Vb 1
|
|
|
|
\& /tmp/test.o: /tmp/test.c /tmp/test.h
|
|
|
|
.Ve
|
|
|
|
.Vb 1
|
|
|
|
\& /tmp/test.h:
|
|
|
|
.Ve
|
|
|
|
.Ip "\fB\-MQ\fR \fItarget\fR" 4
|
|
|
|
.IX Item "-MQ target"
|
|
|
|
.PD 0
|
|
|
|
.Ip "\fB\-MT\fR \fItarget\fR" 4
|
|
|
|
.IX Item "-MT target"
|
|
|
|
.PD
|
|
|
|
By default \s-1CPP\s0 uses the main file name, including any path, and appends
|
|
|
|
the object suffix, normally ``.o'', to it to obtain the name of the
|
|
|
|
target for dependency generation. With \fB\-MT\fR you can specify a
|
|
|
|
target yourself, overriding the default one.
|
|
|
|
.Sp
|
|
|
|
If you want multiple targets, you can specify them as a single argument
|
|
|
|
to \fB\-MT\fR, or use multiple \fB\-MT\fR options.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Sp
|
2001-01-12 19:51:27 +01:00
|
|
|
The targets you specify are output in the order they appear on the
|
|
|
|
command line. \fB\-MQ\fR is identical to \fB\-MT\fR, except that the
|
|
|
|
target name is quoted for Make, but with \fB\-MT\fR it isn't. For
|
|
|
|
example, \-MT '$(objpfx)foo.o' gives
|
1999-06-14 19:21:46 +02:00
|
|
|
.Sp
|
2001-01-12 19:51:27 +01:00
|
|
|
.Vb 1
|
|
|
|
\& $(objpfx)foo.o: /tmp/foo.c
|
|
|
|
.Ve
|
|
|
|
but \-MQ '$(objpfx)foo.o' gives
|
|
|
|
.Sp
|
|
|
|
.Vb 1
|
|
|
|
\& $$(objpfx)foo.o: /tmp/foo.c
|
|
|
|
.Ve
|
|
|
|
The default target is automatically quoted, as if it were given with
|
|
|
|
\&\fB\-MQ\fR.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-H\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-H"
|
1999-06-14 19:21:46 +02:00
|
|
|
Print the name of each header file used, in addition to other normal
|
|
|
|
activities.
|
2001-01-03 21:15:01 +01:00
|
|
|
.Ip "\fB\-imacros\fR \fIfile\fR" 4
|
|
|
|
.IX Item "-imacros file"
|
1999-06-14 19:21:46 +02:00
|
|
|
Process \fIfile\fR as input, discarding the resulting output, before
|
|
|
|
processing the regular input file. Because the output generated from
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fIfile\fR is discarded, the only effect of \fB\-imacros\fR \fIfile\fR
|
1999-06-14 19:21:46 +02:00
|
|
|
is to make the macros defined in \fIfile\fR available for use in the
|
|
|
|
main input.
|
2001-01-03 21:15:01 +01:00
|
|
|
.Ip "\fB\-include\fR \fIfile\fR" 4
|
|
|
|
.IX Item "-include file"
|
1999-06-14 19:21:46 +02:00
|
|
|
Process \fIfile\fR as input, and include all the resulting output,
|
|
|
|
before processing the regular input file.
|
2001-01-03 21:15:01 +01:00
|
|
|
.Ip "\fB\-idirafter\fR \fIdir\fR" 4
|
|
|
|
.IX Item "-idirafter dir"
|
1999-06-14 19:21:46 +02:00
|
|
|
Add the directory \fIdir\fR to the second include path. The directories
|
|
|
|
on the second include path are searched when a header file is not found
|
|
|
|
in any of the directories in the main include path (the one that
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fB\-I\fR adds to).
|
|
|
|
.Ip "\fB\-iprefix\fR \fIprefix\fR" 4
|
|
|
|
.IX Item "-iprefix prefix"
|
1999-06-14 19:21:46 +02:00
|
|
|
Specify \fIprefix\fR as the prefix for subsequent \fB\-iwithprefix\fR
|
2000-08-02 09:08:49 +02:00
|
|
|
options. If the prefix represents a directory, you should include the
|
|
|
|
final \fB/\fR.
|
2001-01-03 21:15:01 +01:00
|
|
|
.Ip "\fB\-iwithprefix\fR \fIdir\fR" 4
|
|
|
|
.IX Item "-iwithprefix dir"
|
1999-06-14 19:21:46 +02:00
|
|
|
Add a directory to the second include path. The directory's name is
|
2000-08-02 09:08:49 +02:00
|
|
|
made by concatenating \fIprefix\fR and \fIdir\fR, where \fIprefix\fR was
|
|
|
|
specified previously with \fB\-iprefix\fR.
|
2001-01-03 21:15:01 +01:00
|
|
|
.Ip "\fB\-isystem\fR \fIdir\fR" 4
|
|
|
|
.IX Item "-isystem dir"
|
1999-06-14 19:21:46 +02:00
|
|
|
Add a directory to the beginning of the second include path, marking it
|
|
|
|
as a system directory, so that it gets the same special treatment as
|
2000-08-02 09:08:49 +02:00
|
|
|
is applied to the standard system directories.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-x c\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-x c"
|
|
|
|
.PD 0
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-x c++\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-x c++"
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-x objective-c\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-x objective-c"
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-x assembler-with-cpp\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-x assembler-with-cpp"
|
|
|
|
.PD
|
1999-06-14 19:21:46 +02:00
|
|
|
Specify the source language: C, \*(C+, Objective-C, or assembly. This has
|
|
|
|
nothing to do with standards conformance or extensions; it merely
|
|
|
|
selects which base syntax to expect. If you give none of these options,
|
|
|
|
cpp will deduce the language from the extension of the source file:
|
|
|
|
\&\fB.c\fR, \fB.cc\fR, \fB.m\fR, or \fB.S\fR. Some other common
|
|
|
|
extensions for \*(C+ and assembly are also recognized. If cpp does not
|
|
|
|
recognize the extension, it will treat the file as C; this is the most
|
|
|
|
generic mode.
|
|
|
|
.Sp
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fBNote:\fR Previous versions of cpp accepted a \fB\-lang\fR option
|
1999-06-14 19:21:46 +02:00
|
|
|
which selected both the language and the standards conformance level.
|
|
|
|
This option has been removed, because it conflicts with the \fB\-l\fR
|
|
|
|
option.
|
2001-01-03 21:15:01 +01:00
|
|
|
.Ip "\fB\-std=\fR\fIstandard\fR" 4
|
|
|
|
.IX Item "-std=standard"
|
|
|
|
.PD 0
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-ansi\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-ansi"
|
|
|
|
.PD
|
1999-06-14 19:21:46 +02:00
|
|
|
Specify the standard to which the code should conform. Currently cpp
|
|
|
|
only knows about the standards for C; other language standards will be
|
|
|
|
added in the future.
|
|
|
|
.Sp
|
2001-01-03 21:15:01 +01:00
|
|
|
\&\fIstandard\fR
|
1999-06-14 19:21:46 +02:00
|
|
|
may be one of:
|
2000-08-02 09:08:49 +02:00
|
|
|
.RS 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.if n .Ip "\f(CW""iso9899:1990""\fR" 4
|
|
|
|
.el .Ip "\f(CWiso9899:1990\fR" 4
|
|
|
|
.IX Item "iso9899:1990"
|
2000-08-02 09:08:49 +02:00
|
|
|
.PD 0
|
2001-01-03 21:15:01 +01:00
|
|
|
.if n .Ip "\f(CW""c89""\fR" 4
|
|
|
|
.el .Ip "\f(CWc89\fR" 4
|
|
|
|
.IX Item "c89"
|
|
|
|
.PD
|
2000-08-02 09:08:49 +02:00
|
|
|
The \s-1ISO\s0 C standard from 1990. \fBc89\fR is the customary shorthand for
|
|
|
|
this version of the standard.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Sp
|
|
|
|
The \fB\-ansi\fR option is equivalent to \fB\-std=c89\fR.
|
2001-01-03 21:15:01 +01:00
|
|
|
.if n .Ip "\f(CW""iso9899:199409""\fR" 4
|
|
|
|
.el .Ip "\f(CWiso9899:199409\fR" 4
|
|
|
|
.IX Item "iso9899:199409"
|
2000-08-02 09:08:49 +02:00
|
|
|
The 1990 C standard, as amended in 1994.
|
2001-01-03 21:15:01 +01:00
|
|
|
.if n .Ip "\f(CW""iso9899:1999""\fR" 4
|
|
|
|
.el .Ip "\f(CWiso9899:1999\fR" 4
|
|
|
|
.IX Item "iso9899:1999"
|
|
|
|
.PD 0
|
|
|
|
.if n .Ip "\f(CW""c99""\fR" 4
|
|
|
|
.el .Ip "\f(CWc99\fR" 4
|
|
|
|
.IX Item "c99"
|
|
|
|
.if n .Ip "\f(CW""iso9899:199x""\fR" 4
|
|
|
|
.el .Ip "\f(CWiso9899:199x\fR" 4
|
|
|
|
.IX Item "iso9899:199x"
|
|
|
|
.if n .Ip "\f(CW""c9x""\fR" 4
|
|
|
|
.el .Ip "\f(CWc9x\fR" 4
|
|
|
|
.IX Item "c9x"
|
|
|
|
.PD
|
2000-08-02 09:08:49 +02:00
|
|
|
The revised \s-1ISO\s0 C standard, published in December 1999. Before
|
|
|
|
publication, this was known as C9X.
|
2001-01-03 21:15:01 +01:00
|
|
|
.if n .Ip "\f(CW""gnu89""\fR" 4
|
|
|
|
.el .Ip "\f(CWgnu89\fR" 4
|
|
|
|
.IX Item "gnu89"
|
1999-06-14 19:21:46 +02:00
|
|
|
The 1990 C standard plus \s-1GNU\s0 extensions. This is the default.
|
2001-01-03 21:15:01 +01:00
|
|
|
.if n .Ip "\f(CW""gnu99""\fR" 4
|
|
|
|
.el .Ip "\f(CWgnu99\fR" 4
|
|
|
|
.IX Item "gnu99"
|
|
|
|
.PD 0
|
|
|
|
.if n .Ip "\f(CW""gnu9x""\fR" 4
|
|
|
|
.el .Ip "\f(CWgnu9x\fR" 4
|
|
|
|
.IX Item "gnu9x"
|
2000-08-02 09:08:49 +02:00
|
|
|
.PD
|
2001-01-03 21:15:01 +01:00
|
|
|
The 1999 C standard plus \s-1GNU\s0 extensions.
|
|
|
|
.RE
|
|
|
|
.RS 4
|
2000-08-02 09:08:49 +02:00
|
|
|
.RE
|
2001-01-03 21:15:01 +01:00
|
|
|
.Ip "\fB\-ftabstop=NUMBER\fR" 4
|
|
|
|
.IX Item "-ftabstop=NUMBER"
|
|
|
|
Set the distance between tab stops. This helps the preprocessor
|
2000-08-02 09:08:49 +02:00
|
|
|
report correct column numbers in warnings or errors, even if tabs appear
|
|
|
|
on the line. Values less than 1 or greater than 100 are ignored. The
|
|
|
|
default is 8.
|
1999-06-14 19:21:46 +02:00
|
|
|
.Ip "\fB\-$\fR" 4
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Item "-$"
|
2000-08-02 09:08:49 +02:00
|
|
|
Forbid the use of \fB$\fR in identifiers. The C standard allows
|
|
|
|
implementations to define extra characters that can appear in
|
|
|
|
identifiers. By default the \s-1GNU\s0 C preprocessor permits \fB$\fR, a
|
|
|
|
common extension.
|
1999-06-14 19:21:46 +02:00
|
|
|
.SH "SEE ALSO"
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Header "SEE ALSO"
|
|
|
|
\&\fIgcc\fR\|(1), \fIas\fR\|(1), \fIld\fR\|(1), and the Info entries for \fIcpp\fR, \fIgcc\fR, and
|
|
|
|
\&\fIbinutils\fR.
|
1999-06-14 19:21:46 +02:00
|
|
|
.SH "COPYRIGHT"
|
2001-01-03 21:15:01 +01:00
|
|
|
.IX Header "COPYRIGHT"
|
|
|
|
Copyright (c) 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
|
2001-01-12 19:51:27 +01:00
|
|
|
1997, 1998, 1999, 2000, 2001
|
1999-06-14 19:21:46 +02:00
|
|
|
Free Software Foundation, Inc.
|
|
|
|
.PP
|
|
|
|
Permission is granted to make and distribute verbatim copies of
|
|
|
|
this manual provided the copyright notice and this permission notice
|
|
|
|
are preserved on all copies.
|
|
|
|
.PP
|
|
|
|
Permission is granted to copy and distribute modified versions of this
|
|
|
|
manual under the conditions for verbatim copying, provided also that
|
|
|
|
the entire resulting derived work is distributed under the terms of a
|
|
|
|
permission notice identical to this one.
|
|
|
|
.PP
|
|
|
|
Permission is granted to copy and distribute translations of this manual
|
|
|
|
into another language, under the above conditions for modified versions.
|