* cpp.texi: Update.
From-SVN: r37094
This commit is contained in:
parent
04e149abb6
commit
ae2eceaad2
2 changed files with 44 additions and 21 deletions
|
@ -1,3 +1,7 @@
|
|||
2000-10-27 Neil Booth <neilb@earthling.net>
|
||||
|
||||
* cpp.texi: Update.
|
||||
|
||||
2000-10-27 Kelley Cook <kelley.cook@home.com>
|
||||
|
||||
* invoke.texi: Document -mintel-syntax
|
||||
|
|
61
gcc/cpp.texi
61
gcc/cpp.texi
|
@ -2379,13 +2379,14 @@ understand @code{sizeof}, or typedef names, or even the type keywords
|
|||
such as @code{int}.)
|
||||
|
||||
@findex defined
|
||||
The special operator @samp{defined} is used in @samp{#if} expressions to
|
||||
test whether a certain name is defined as a macro. Either @samp{defined
|
||||
@var{name}} or @samp{defined (@var{name})} is an expression whose value
|
||||
is 1 if @var{name} is defined as macro at the current point in the
|
||||
program, and 0 otherwise. For the @samp{defined} operator it makes no
|
||||
difference what the definition of the macro is; all that matters is
|
||||
whether there is a definition. Thus, for example,@refill
|
||||
The special operator @samp{defined} is used in @samp{#if} and
|
||||
@samp{#elif} expressions to test whether a certain name is defined as a
|
||||
macro. Either @samp{defined @var{name}} or @samp{defined (@var{name})}
|
||||
is an expression whose value is 1 if @var{name} is defined as macro at
|
||||
the current point in the program, and 0 otherwise. To the
|
||||
@samp{defined} operator it makes no difference what the definition of
|
||||
the macro is; all that matters is whether there is a definition. Thus,
|
||||
for example,@refill
|
||||
|
||||
@example
|
||||
#if defined (vax) || defined (ns16000)
|
||||
|
@ -2405,6 +2406,12 @@ use of the @samp{defined} operator returns 0, because the name is no
|
|||
longer defined. If the macro is defined again with another
|
||||
@samp{#define}, @samp{defined} will recommence returning 1.
|
||||
|
||||
If the @samp{defined} operator appears as a result of a macro expansion,
|
||||
the C standard says the behavior is undefined. GNU cpp treats it as a
|
||||
genuine @samp{defined} operator and evaluates it normally. It will warn
|
||||
wherever your code uses this feature if you use the command-line option
|
||||
@samp{-pedantic}, since other compilers may handle it differently.
|
||||
|
||||
@findex #ifdef
|
||||
@findex #ifndef
|
||||
Conditionals that test whether a single macro is defined are very common,
|
||||
|
@ -2793,29 +2800,31 @@ This indicates that the following text should be treated as C@.
|
|||
@end table
|
||||
|
||||
@node Implementation, Unreliable Features, Output, Top
|
||||
@section Implementation-defined Behavior and Implemenation Limits
|
||||
@section Implementation-defined Behavior and Implementation Limits
|
||||
@cindex implementation limits
|
||||
@cindex implementation-defined behavior
|
||||
|
||||
The ISO C standard mandates that implementations document various
|
||||
aspects of preprocessor behavior. You should try to avoid undue
|
||||
reliance on behaviour described here, as it is probable that it will
|
||||
reliance on behaviour described here, as it is possible that it will
|
||||
change subtly in future implementations.
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item The mapping of physical source file multibyte characters to the execution
|
||||
character set.
|
||||
@item The mapping of physical source file multi-byte characters to the
|
||||
execution character set.
|
||||
|
||||
Currenty, GNU cpp only supports character sets that are strict supersets
|
||||
Currently, GNU cpp only supports character sets that are strict supersets
|
||||
of ASCII, and performs no translation of characters.
|
||||
|
||||
@item Non-empty sequences of whitespace characters.
|
||||
|
||||
Each whitespace sequence is not preserved, but collapsed to a single
|
||||
space.
|
||||
space. For aesthetic reasons, the first token on each non-directive
|
||||
line of output is preceded with sufficient spaces that it appears in the
|
||||
same column as it did in the original source file.
|
||||
|
||||
@item The numeric value of characeter constants in preprocessor expressions.
|
||||
@item The numeric value of character constants in preprocessor expressions.
|
||||
|
||||
The preprocessor interprets character constants in preprocessing
|
||||
directives on the host machine. Expressions outside preprocessing
|
||||
|
@ -2824,6 +2833,16 @@ normal case of a native compiler, these two environments are the same
|
|||
and so character constants will be evaluated identically in both cases.
|
||||
However, in the case of a cross compiler, the values may be different.
|
||||
|
||||
Multi-character character constants are interpreted a character at a
|
||||
time, shifting the previous result left by the number of bits per
|
||||
character on the host, and adding the new character. For example, 'ab'
|
||||
on an 8-bit host would be interpreted as 'a' * 256 + 'b'. If there are
|
||||
more characters in the constant than can fit in the widest native
|
||||
integer type on the host, usually a @samp{long}, the behavior is
|
||||
undefined.
|
||||
|
||||
Evaluation of wide character constants is not properly implemented yet.
|
||||
|
||||
@item Source file inclusion.
|
||||
|
||||
For a discussion on how the preprocessor locates header files,
|
||||
|
@ -2858,17 +2877,17 @@ The following documents internal limits of GNU cpp.
|
|||
@item Nesting levels of @samp{#include} files.
|
||||
|
||||
We impose an arbitrary limit of 200 levels, to avoid runaway recursion.
|
||||
The standard requires at least 15 levels be permitted.
|
||||
The standard requires at least 15 levels.
|
||||
|
||||
@item Nesting levels of conditional inclusion.
|
||||
|
||||
The C standard mandates this be at least 63. The GNU C preprocessor
|
||||
is limited only by available memory.
|
||||
|
||||
@item Levels of paranthesised expressions within a full expression.
|
||||
@item Levels of parenthesised expressions within a full expression.
|
||||
|
||||
The C standard requires this to be at least 63. In preprocessor
|
||||
conditional expresssions it is limited only by available memory.
|
||||
conditional expressions it is limited only by available memory.
|
||||
|
||||
@item Significant initial characters in an identifier or macro name.
|
||||
|
||||
|
@ -2880,7 +2899,7 @@ requires only that the first 63 be significant.
|
|||
The standard requires at least 4095 be possible; GNU cpp is limited only
|
||||
by available memory.
|
||||
|
||||
@item Number of paramters in a macro definition and arguments in a macro call.
|
||||
@item Number of parameters in a macro definition and arguments in a macro call.
|
||||
|
||||
We allow USHRT_MAX, which is normally 65,535, and above the minimum of
|
||||
127 required by the standard.
|
||||
|
@ -2956,7 +2975,7 @@ Formerly, in a macro expansion, if @samp{##} appeared before a variable
|
|||
arguments parameter, and the set of tokens specified for that argument in
|
||||
the macro invocation was empty, previous versions of the GNU C
|
||||
preprocessor would back up and remove the preceding sequence of
|
||||
nonwhitespace characters (@strong{not} the preceding token). This
|
||||
non-whitespace characters (@strong{not} the preceding token). This
|
||||
extension is in direct conflict with the 1999 C standard and has been
|
||||
drastically pared back.
|
||||
|
||||
|
@ -2995,7 +3014,7 @@ used at all.
|
|||
|
||||
@item #pragma poison
|
||||
|
||||
This pragma has been superceded by @samp{#pragma GCC poison}.
|
||||
This pragma has been superseded by @samp{#pragma GCC poison}.
|
||||
@xref{Poisoning}.
|
||||
|
||||
@item Multi-line string literals in directives
|
||||
|
@ -3531,7 +3550,7 @@ The 1999 C standard plus GNU extensions.
|
|||
|
||||
@item -ftabstop=NUMBER
|
||||
@findex -ftabstop
|
||||
Set the distance between tabstops. This helps the preprocessor
|
||||
Set the distance between tab stops. This helps the preprocessor
|
||||
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.
|
||||
|
|
Loading…
Add table
Reference in a new issue