Commit cd98faa1 by Neil Booth Committed by Neil Booth

cpperror.c (cpp_error): Default to directive_line within directives here.

	* cpperror.c (cpp_error): Default to directive_line within
	directives here.
	* cppexp.c (cpp_interpret_integer): Only use traditional
	number semantics in directives.
	* cpplib.c (prepare_directive_trad): Don't reset pfile->line.
	(do_include_common): Similarly.
	* cpptrad.c (scan_out_logical_line): Implement accurate
	quoting of <> in #include.
	* doc/cpp.texi: Update.

From-SVN: r55347
parent 2ad65b0e
2002-07-09 Neil Booth <neil@daikokuya.co.uk>
* cpperror.c (cpp_error): Default to directive_line within
directives here.
* cppexp.c (cpp_interpret_integer): Only use traditional
number semantics in directives.
* cpplib.c (prepare_directive_trad): Don't reset pfile->line.
(do_include_common): Similarly.
* cpptrad.c (scan_out_logical_line): Implement accurate
quoting of <> in #include.
* doc/cpp.texi: Update.
Tue Jul 9 22:37:44 2002 Stephen Clarke <stephen.clarke@superh.com> Tue Jul 9 22:37:44 2002 Stephen Clarke <stephen.clarke@superh.com>
J"orn Rennecke <joern.rennecke@superh.com> J"orn Rennecke <joern.rennecke@superh.com>
......
...@@ -139,7 +139,10 @@ cpp_error VPARAMS ((cpp_reader * pfile, int level, const char *msgid, ...)) ...@@ -139,7 +139,10 @@ cpp_error VPARAMS ((cpp_reader * pfile, int level, const char *msgid, ...))
{ {
if (CPP_OPTION (pfile, traditional)) if (CPP_OPTION (pfile, traditional))
{ {
line = pfile->line; if (pfile->state.in_directive)
line = pfile->directive_line;
else
line = pfile->line;
column = 0; column = 0;
} }
else else
......
...@@ -377,9 +377,11 @@ cpp_interpret_integer (pfile, token, type) ...@@ -377,9 +377,11 @@ cpp_interpret_integer (pfile, token, type)
"integer constant is too large for its type"); "integer constant is too large for its type");
/* If too big to be signed, consider it unsigned. Only warn for /* If too big to be signed, consider it unsigned. Only warn for
decimal numbers. Traditional numbers were always signed (but decimal numbers. Traditional numbers were always signed (but
we still honour an explicit U suffix). */ we still honour an explicit U suffix); but we only have
traditional semantics in directives. */
else if (!result.unsignedp else if (!result.unsignedp
&& !CPP_OPTION (pfile, traditional) && !(CPP_OPTION (pfile, traditional)
&& pfile->state.in_directive)
&& !num_positive (result, precision)) && !num_positive (result, precision))
{ {
if (base == 10) if (base == 10)
......
...@@ -303,9 +303,6 @@ prepare_directive_trad (pfile) ...@@ -303,9 +303,6 @@ prepare_directive_trad (pfile)
pfile->out.cur - pfile->out.base); pfile->out.cur - pfile->out.base);
} }
/* Report diagnostics on the line of the directive. */
pfile->line = pfile->directive_line;
/* Stop ISO C from expanding anything. */ /* Stop ISO C from expanding anything. */
pfile->state.prevent_expansion++; pfile->state.prevent_expansion++;
} }
...@@ -689,10 +686,6 @@ do_include_common (pfile, type) ...@@ -689,10 +686,6 @@ do_include_common (pfile, type)
if (pfile->cb.include) if (pfile->cb.include)
(*pfile->cb.include) (pfile, pfile->directive_line, (*pfile->cb.include) (pfile, pfile->directive_line,
pfile->directive->name, header); pfile->directive->name, header);
/* Revert to the correct line if traditional. */
if (CPP_OPTION (pfile, traditional))
pfile->line = pfile->saved_line;
_cpp_execute_include (pfile, header, type); _cpp_execute_include (pfile, header, type);
} }
} }
......
...@@ -437,11 +437,13 @@ scan_out_logical_line (pfile, macro) ...@@ -437,11 +437,13 @@ scan_out_logical_line (pfile, macro)
struct fun_macro fmacro; struct fun_macro fmacro;
unsigned int c, paren_depth = 0, quote; unsigned int c, paren_depth = 0, quote;
enum ls lex_state = ls_none; enum ls lex_state = ls_none;
bool header_ok;
fmacro.buff = NULL; fmacro.buff = NULL;
start_logical_line: start_logical_line:
quote = 0; quote = 0;
header_ok = pfile->state.angled_headers;
CUR (pfile->context) = pfile->buffer->cur; CUR (pfile->context) = pfile->buffer->cur;
RLIMIT (pfile->context) = pfile->buffer->rlimit; RLIMIT (pfile->context) = pfile->buffer->rlimit;
pfile->out.cur = pfile->out.base; pfile->out.cur = pfile->out.base;
...@@ -500,15 +502,12 @@ scan_out_logical_line (pfile, macro) ...@@ -500,15 +502,12 @@ scan_out_logical_line (pfile, macro)
goto done; goto done;
case '<': case '<':
if (pfile->state.angled_headers && !quote) if (header_ok)
quote = '>'; quote = '>';
break; break;
case '>': case '>':
if (c == quote) if (c == quote)
{ quote = 0;
pfile->state.angled_headers = false;
quote = 0;
}
break; break;
case '"': case '"':
...@@ -736,7 +735,9 @@ scan_out_logical_line (pfile, macro) ...@@ -736,7 +735,9 @@ scan_out_logical_line (pfile, macro)
break; break;
} }
/* Non-whitespace disables MI optimization. */ /* Non-whitespace disables MI optimization and stops treating
'<' as a quote in #include. */
header_ok = false;
if (!pfile->state.in_directive) if (!pfile->state.in_directive)
pfile->mi_valid = false; pfile->mi_valid = false;
......
...@@ -224,6 +224,16 @@ of a program which does not expect them. To get strict ISO Standard C, ...@@ -224,6 +224,16 @@ of a program which does not expect them. To get strict ISO Standard C,
you should use the @option{-std=c89} or @option{-std=c99} options, depending you should use the @option{-std=c89} or @option{-std=c99} options, depending
on which version of the standard you want. To get all the mandatory on which version of the standard you want. To get all the mandatory
diagnostics, you must also use @option{-pedantic}. @xref{Invocation}. diagnostics, you must also use @option{-pedantic}. @xref{Invocation}.
This manual describes the behavior of the ISO preprocessor. To
minimize gratuitous differences, where the ISO preprocessor's
behavior does not conflict with traditional semantics, the
traditional preprocessor should behave the same way. The various
differences that do exist are detailed in the section @ref{Traditional
Mode}.
For clarity, unless noted otherwise, references to @samp{CPP} in this
manual refer to GNU CPP.
@c man end @c man end
@menu @menu
...@@ -238,7 +248,7 @@ diagnostics, you must also use @option{-pedantic}. @xref{Invocation}. ...@@ -238,7 +248,7 @@ diagnostics, you must also use @option{-pedantic}. @xref{Invocation}.
The preprocessor performs a series of textual transformations on its The preprocessor performs a series of textual transformations on its
input. These happen before all other processing. Conceptually, they input. These happen before all other processing. Conceptually, they
happen in a rigid order, and the entire file is run through each happen in a rigid order, and the entire file is run through each
transformation before the next one begins. GNU CPP actually does them transformation before the next one begins. CPP actually does them
all at once, for performance reasons. These transformations correspond all at once, for performance reasons. These transformations correspond
roughly to the first three ``phases of translation'' described in the C roughly to the first three ``phases of translation'' described in the C
standard. standard.
...@@ -249,7 +259,7 @@ standard. ...@@ -249,7 +259,7 @@ standard.
@cindex line endings @cindex line endings
The input file is read into memory and broken into lines. The input file is read into memory and broken into lines.
GNU CPP expects its input to be a text file, that is, an unstructured CPP expects its input to be a text file, that is, an unstructured
stream of ASCII characters, with some characters indicating the end of a stream of ASCII characters, with some characters indicating the end of a
line of text. Extended ASCII character sets, such as ISO Latin-1 or line of text. Extended ASCII character sets, such as ISO Latin-1 or
Unicode encoded in UTF-8, are also acceptable. Character sets that are Unicode encoded in UTF-8, are also acceptable. Character sets that are
...@@ -276,15 +286,16 @@ warning message. ...@@ -276,15 +286,16 @@ warning message.
@item @item
@cindex trigraphs @cindex trigraphs
@anchor{trigraphs}If trigraphs are enabled, they are replaced by their @anchor{trigraphs}If trigraphs are enabled, they are replaced by their
corresponding single characters. corresponding single characters. By default GCC ignores trigraphs,
but if you request a strictly conforming mode with the @option{-std}
option, or you specify the @option{-trigraphs} option, then it
converts them.
These are nine three-character sequences, all starting with @samp{??}, These are nine three-character sequences, all starting with @samp{??},
that are defined by ISO C to stand for single characters. They permit that are defined by ISO C to stand for single characters. They permit
obsolete systems that lack some of C's punctuation to use C@. For obsolete systems that lack some of C's punctuation to use C@. For
example, @samp{??/} stands for @samp{\}, so @t{'??/n'} is a character example, @samp{??/} stands for @samp{\}, so @t{'??/n'} is a character
constant for a newline. By default, GCC ignores trigraphs, but if you constant for a newline.
request a strictly conforming mode with the @option{-std} option, then
it converts them.
Trigraphs are not popular and many compilers implement them incorrectly. Trigraphs are not popular and many compilers implement them incorrectly.
Portable code should not rely on trigraphs being either converted or Portable code should not rely on trigraphs being either converted or
...@@ -886,7 +897,7 @@ because @code{FILE_FOO_SEEN} is defined. The preprocessor will skip ...@@ -886,7 +897,7 @@ because @code{FILE_FOO_SEEN} is defined. The preprocessor will skip
over the entire contents of the file, and the compiler will not see it over the entire contents of the file, and the compiler will not see it
twice. twice.
GNU CPP optimizes even further. It remembers when a header file has a CPP optimizes even further. It remembers when a header file has a
wrapper @samp{#ifndef}. If a subsequent @samp{#include} specifies that wrapper @samp{#ifndef}. If a subsequent @samp{#include} specifies that
header, and the macro in the @samp{#ifndef} is still defined, it does header, and the macro in the @samp{#ifndef} is still defined, it does
not bother to rescan the file at all. not bother to rescan the file at all.
...@@ -1599,7 +1610,7 @@ or to paste its leading or trailing token with another token. (But see ...@@ -1599,7 +1610,7 @@ or to paste its leading or trailing token with another token. (But see
below for an important special case for @samp{##}.) below for an important special case for @samp{##}.)
If your macro is complicated, you may want a more descriptive name for If your macro is complicated, you may want a more descriptive name for
the variable argument than @code{@w{__VA_ARGS__}}. GNU CPP permits the variable argument than @code{@w{__VA_ARGS__}}. CPP permits
this, as an extension. You may write an argument name immediately this, as an extension. You may write an argument name immediately
before the @samp{@dots{}}; that name is used for the variable argument. before the @samp{@dots{}}; that name is used for the variable argument.
The @code{eprintf} macro above could be written The @code{eprintf} macro above could be written
...@@ -1674,7 +1685,7 @@ only named variable arguments. On the other hand, if you are concerned ...@@ -1674,7 +1685,7 @@ only named variable arguments. On the other hand, if you are concerned
with portability to other conforming implementations of C99, you should with portability to other conforming implementations of C99, you should
use only @code{@w{__VA_ARGS__}}. use only @code{@w{__VA_ARGS__}}.
Previous versions of GNU CPP implemented the comma-deletion extension Previous versions of CPP implemented the comma-deletion extension
much more generally. We have restricted it in this release to minimize much more generally. We have restricted it in this release to minimize
the differences from C99. To get the same effect with both this and the differences from C99. To get the same effect with both this and
previous versions of GCC, the token preceding the special @samp{##} must previous versions of GCC, the token preceding the special @samp{##} must
...@@ -1778,14 +1789,14 @@ eight characters and looks like @code{"23:59:01"}. ...@@ -1778,14 +1789,14 @@ eight characters and looks like @code{"23:59:01"}.
In normal operation, this macro expands to the constant 1, to signify In normal operation, this macro expands to the constant 1, to signify
that this compiler conforms to ISO Standard C@. If GNU CPP is used with that this compiler conforms to ISO Standard C@. If GNU CPP is used with
a compiler other than GCC, this is not necessarily true; however, the a compiler other than GCC, this is not necessarily true; however, the
preprocessor always conforms to the standard, unless the preprocessor always conforms to the standard unless the
@option{-traditional-cpp} option is used. @option{-traditional-cpp} option is used.
This macro is not defined if the @option{-traditional-cpp} option is used. This macro is not defined if the @option{-traditional-cpp} option is used.
On some hosts, the system compiler uses a different convention, where On some hosts, the system compiler uses a different convention, where
@code{__STDC__} is normally 0, but is 1 if the user specifies strict @code{__STDC__} is normally 0, but is 1 if the user specifies strict
conformance to the C Standard. GNU CPP follows the host convention when conformance to the C Standard. CPP follows the host convention when
processing system header files, but when processing user files processing system header files, but when processing user files
@code{__STDC__} is always 1. This has been reported to cause problems; @code{__STDC__} is always 1. This has been reported to cause problems;
for instance, some versions of Solaris provide X Windows headers that for instance, some versions of Solaris provide X Windows headers that
...@@ -2115,7 +2126,7 @@ Occasionally it is convenient to use preprocessor directives within ...@@ -2115,7 +2126,7 @@ Occasionally it is convenient to use preprocessor directives within
the arguments of a macro. The C and C++ standards declare that the arguments of a macro. The C and C++ standards declare that
behavior in these cases is undefined. behavior in these cases is undefined.
Versions of GNU CPP prior to 3.2 would reject such constructs with an Versions of CPP prior to 3.2 would reject such constructs with an
error message. This was the only syntactic difference between normal error message. This was the only syntactic difference between normal
functions and function-like macros, so it seemed attractive to remove functions and function-like macros, so it seemed attractive to remove
this limitation, and people would often be surprised that they could this limitation, and people would often be surprised that they could
...@@ -2738,7 +2749,7 @@ good practice if there is a lot of @var{controlled text}, because it ...@@ -2738,7 +2749,7 @@ good practice if there is a lot of @var{controlled text}, because it
helps people match the @samp{#endif} to the corresponding @samp{#ifdef}. helps people match the @samp{#endif} to the corresponding @samp{#ifdef}.
Older programs sometimes put @var{MACRO} directly after the Older programs sometimes put @var{MACRO} directly after the
@samp{#endif} without enclosing it in a comment. This is invalid code @samp{#endif} without enclosing it in a comment. This is invalid code
according to the C standard. GNU CPP accepts it with a warning. It according to the C standard. CPP accepts it with a warning. It
never affects which @samp{#ifndef} the @samp{#endif} matches. never affects which @samp{#ifndef} the @samp{#endif} matches.
@findex #ifndef @findex #ifndef
...@@ -3074,7 +3085,7 @@ file it specifies, until something else happens to change that. ...@@ -3074,7 +3085,7 @@ file it specifies, until something else happens to change that.
constant: backslash escapes are interpreted. This is different from constant: backslash escapes are interpreted. This is different from
@samp{#include}. @samp{#include}.
Previous versions of GNU CPP did not interpret escapes in @samp{#line}; Previous versions of CPP did not interpret escapes in @samp{#line};
we have changed it because the standard requires they be interpreted, we have changed it because the standard requires they be interpreted,
and most other compilers do. and most other compilers do.
...@@ -3340,9 +3351,8 @@ the preprocessing specified by the standard. When GCC is given the ...@@ -3340,9 +3351,8 @@ the preprocessing specified by the standard. When GCC is given the
preprocessor. preprocessor.
GCC versions 3.2 and later only support traditional mode semantics in GCC versions 3.2 and later only support traditional mode semantics in
the preprocessor, and not in the compiler. This chapter outlines the the preprocessor, and not in the compiler front ends. This chapter
semantics we implemented in the traditional preprocessor that is outlines the traditional preprocessor semantics we implemented.
integrated into the compiler front end.
The implementation does not correspond precisely to the behavior of The implementation does not correspond precisely to the behavior of
earlier versions of GCC, nor to any true traditional preprocessor. earlier versions of GCC, nor to any true traditional preprocessor.
...@@ -3363,10 +3373,10 @@ that actually matter. ...@@ -3363,10 +3373,10 @@ that actually matter.
The traditional preprocessor does not decompose its input into tokens The traditional preprocessor does not decompose its input into tokens
the same way a standards-conforming preprocessor does. The input is the same way a standards-conforming preprocessor does. The input is
simply treated as a stream of text with minimal form imposed on it. simply treated as a stream of text with minimal internal form.
This implementation does not treat trigraphs (@pxref{trigraphs}) This implementation does not treat trigraphs (@pxref{trigraphs})
specially since they were created later during standardization. It specially since they were an invention of the standards committee. It
handles arbitrarily-positioned escaped newlines properly and splices handles arbitrarily-positioned escaped newlines properly and splices
the lines as you would expect; many traditional preprocessors did not the lines as you would expect; many traditional preprocessors did not
do this. do this.
...@@ -3378,13 +3388,15 @@ useful if, for example, you are preprocessing a Makefile. ...@@ -3378,13 +3388,15 @@ useful if, for example, you are preprocessing a Makefile.
Traditional CPP only recognizes C-style block comments, and treats the Traditional CPP only recognizes C-style block comments, and treats the
@samp{/*} sequence as introducing a comment only if it lies outside @samp{/*} sequence as introducing a comment only if it lies outside
quoted text. Quoted text is introduced by the usual single and double quoted text. Quoted text is introduced by the usual single and double
quotes, and also by @samp{<} in a @code{#include} directive. quotes, and also by an initial @samp{<} in a @code{#include}
directive.
Traditionally, comments are completely removed and are not replaced Traditionally, comments are completely removed and are not replaced
with a space. Since a traditional compiler does its own tokenization with a space. Since a traditional compiler does its own tokenization
of the output of the preprocessor, comments can effectively be used as of the output of the preprocessor, this means that comments can
token paste operators. However, comments behave like separators for effectively be used as token paste operators. However, comments
text handled by the preprocessor itself. For example, in behave like separators for text handled by the preprocessor itself,
since it doesn't re-lex its input. For example, in
@smallexample @smallexample
#if foo/**/bar #if foo/**/bar
...@@ -3476,9 +3488,9 @@ behavior to their ISO counterparts. Their arguments are contained ...@@ -3476,9 +3488,9 @@ behavior to their ISO counterparts. Their arguments are contained
within parentheses, are comma-separated, and can cross physical lines. within parentheses, are comma-separated, and can cross physical lines.
Commas within nested parentheses are not treated as argument Commas within nested parentheses are not treated as argument
separators. Similarly, a quote in an argument cannot be left separators. Similarly, a quote in an argument cannot be left
unclosed; in other words a comma or parenthesis in quotes is treated unclosed; a following comma or parenthesis that comes before the
like any other character. There is no facility for handling variadic closing quote is treated like any other character. There is no
macros. facility for handling variadic macros.
This implementation removes all comments from macro arguments, unless This implementation removes all comments from macro arguments, unless
the @option{-C} option is given. The form of all other horizontal the @option{-C} option is given. The form of all other horizontal
...@@ -3506,12 +3518,12 @@ example ...@@ -3506,12 +3518,12 @@ example
@smallexample @smallexample
#define str(x) "x" #define str(x) "x"
str(/* A comment */ some text) str(/* A comment */some text )
@expansion{} " some text" @expansion{} "some text "
@end smallexample @end smallexample
@noindent @noindent
Note that the comment is removed, but that the leading space is Note that the comment is removed, but that the trailing space is
preserved. Here is an example of using a comment to effect token preserved. Here is an example of using a comment to effect token
pasting. pasting.
...@@ -3547,6 +3559,10 @@ __STDC__ is not defined. ...@@ -3547,6 +3559,10 @@ __STDC__ is not defined.
@item @item
If you use digraphs the behaviour is undefined. If you use digraphs the behaviour is undefined.
@item
If a line that looks like a directive appears within macro arguments,
the behaviour is undefined.
@end itemize @end itemize
@node Traditional warnings @node Traditional warnings
...@@ -3607,7 +3623,7 @@ reliance on behavior described here, as it is possible that it will ...@@ -3607,7 +3623,7 @@ reliance on behavior described here, as it is possible that it will
change subtly in future implementations. change subtly in future implementations.
Also documented here are obsolete features and changes from previous Also documented here are obsolete features and changes from previous
versions of GNU CPP@. versions of CPP@.
@menu @menu
* Implementation-defined behavior:: * Implementation-defined behavior::
...@@ -3620,7 +3636,7 @@ versions of GNU CPP@. ...@@ -3620,7 +3636,7 @@ versions of GNU CPP@.
@section Implementation-defined behavior @section Implementation-defined behavior
@cindex implementation-defined behavior @cindex implementation-defined behavior
This is how GNU CPP behaves in all the cases which the C standard This is how CPP behaves in all the cases which the C standard
describes as @dfn{implementation-defined}. This term means that the describes as @dfn{implementation-defined}. This term means that the
implementation is free to do what it likes, but must document its choice implementation is free to do what it likes, but must document its choice
and stick to it. and stick to it.
...@@ -3688,7 +3704,7 @@ pragmas. ...@@ -3688,7 +3704,7 @@ pragmas.
@section Implementation limits @section Implementation limits
@cindex implementation limits @cindex implementation limits
GNU CPP has a small number of internal limits. This section lists the CPP has a small number of internal limits. This section lists the
limits which the C standard requires to be no lower than some minimum, limits which the C standard requires to be no lower than some minimum,
and all the others we are aware of. We intend there to be as few limits and all the others we are aware of. We intend there to be as few limits
as possible. If you encounter an undocumented or inconvenient limit, as possible. If you encounter an undocumented or inconvenient limit,
...@@ -3711,7 +3727,7 @@ The standard requires at least 15 levels. ...@@ -3711,7 +3727,7 @@ The standard requires at least 15 levels.
@item Nesting levels of conditional inclusion. @item Nesting levels of conditional inclusion.
The C standard mandates this be at least 63. GNU CPP is limited only by The C standard mandates this be at least 63. CPP is limited only by
available memory. available memory.
@item Levels of parenthesised expressions within a full expression. @item Levels of parenthesised expressions within a full expression.
...@@ -3726,7 +3742,7 @@ requires only that the first 63 be significant. ...@@ -3726,7 +3742,7 @@ requires only that the first 63 be significant.
@item Number of macros simultaneously defined in a single translation unit. @item Number of macros simultaneously defined in a single translation unit.
The standard requires at least 4095 be possible. GNU CPP is limited only The standard requires at least 4095 be possible. CPP is limited only
by available memory. by available memory.
@item Number of parameters in a macro definition and arguments in a macro call. @item Number of parameters in a macro definition and arguments in a macro call.
...@@ -3736,7 +3752,7 @@ required by the standard is 127. ...@@ -3736,7 +3752,7 @@ required by the standard is 127.
@item Number of characters on a logical source line. @item Number of characters on a logical source line.
The C standard requires a minimum of 4096 be permitted. GNU CPP places The C standard requires a minimum of 4096 be permitted. CPP places
no limits on this, but you may get incorrect column numbers reported in no limits on this, but you may get incorrect column numbers reported in
diagnostics for lines longer than 65,535 characters. diagnostics for lines longer than 65,535 characters.
...@@ -3753,7 +3769,7 @@ may not be a limitation. ...@@ -3753,7 +3769,7 @@ may not be a limitation.
@node Obsolete Features @node Obsolete Features
@section Obsolete Features @section Obsolete Features
GNU CPP has a number of features which are present mainly for CPP has a number of features which are present mainly for
compatibility with older programs. We discourage their use in new code. compatibility with older programs. We discourage their use in new code.
In some cases, we plan to remove the feature in a future version of GCC@. In some cases, we plan to remove the feature in a future version of GCC@.
...@@ -3849,7 +3865,7 @@ You can also make or cancel assertions using command line options. ...@@ -3849,7 +3865,7 @@ You can also make or cancel assertions using command line options.
@node Obsolete once-only headers @node Obsolete once-only headers
@subsection Obsolete once-only headers @subsection Obsolete once-only headers
GNU CPP supports two more ways of indicating that a header file should be CPP supports two more ways of indicating that a header file should be
read only once. Neither one is as portable as a wrapper @samp{#ifndef}, read only once. Neither one is as portable as a wrapper @samp{#ifndef},
and we recommend you do not use them in new programs. and we recommend you do not use them in new programs.
...@@ -3887,7 +3903,7 @@ in a portable program. ...@@ -3887,7 +3903,7 @@ in a portable program.
@cindex differences from previous versions @cindex differences from previous versions
This section details behavior which has changed from previous versions This section details behavior which has changed from previous versions
of GNU CPP@. We do not plan to change it again in the near future, but of CPP@. We do not plan to change it again in the near future, but
we do not promise not to, either. we do not promise not to, either.
The ``previous versions'' discussed here are 2.95 and before. The The ``previous versions'' discussed here are 2.95 and before. The
...@@ -3936,7 +3952,7 @@ versions accepted it silently. ...@@ -3936,7 +3952,7 @@ versions accepted it silently.
Formerly, in a macro expansion, if @samp{##} appeared before a variable Formerly, in a macro expansion, if @samp{##} appeared before a variable
arguments parameter, and the set of tokens specified for that argument arguments parameter, and the set of tokens specified for that argument
in the macro invocation was empty, previous versions of GNU CPP would in the macro invocation was empty, previous versions of CPP would
back up and remove the preceding sequence of non-whitespace characters back up and remove the preceding sequence of non-whitespace characters
(@strong{not} the preceding token). This extension is in direct (@strong{not} the preceding token). This extension is in direct
conflict with the 1999 C standard and has been drastically pared back. conflict with the 1999 C standard and has been drastically pared back.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment