cppmacro.c (_cpp_create_definition): Leave comments off.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Mon, 8 Oct 2001 20:05:36 +0000 (20:05 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Mon, 8 Oct 2001 20:05:36 +0000 (20:05 +0000)
* cppmacro.c (_cpp_create_definition): Leave comments off.

* doc/cpp.texi: Update.

From-SVN: r46089

gcc/ChangeLog
gcc/cppmacro.c
gcc/doc/cpp.texi

index 4387656675d8cc853d7034308b15d2effc5b9da1..888d8148f0af6834b7bf742f9ff45f9f06f39448 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-08  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * cppmacro.c (_cpp_create_definition): Leave comments off.
+
+       * doc/cpp.texi: Update.
+
 2001-10-08  DJ Delorie  <dj@redhat.com>
 
        * c-decl.c (grokfield): Make sure the only unnamed fields
index 221682e97d774841aa03fbb69b7102381699b0ef..4a30831afd20bb9911addda7029a8a909ddaa8d0 100644 (file)
@@ -1329,7 +1329,6 @@ _cpp_create_definition (pfile, node)
   else if (ctoken->type != CPP_EOF && !(ctoken->flags & PREV_WHITE))
     cpp_pedwarn (pfile, "ISO C requires whitespace after the macro name");
 
-  pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments);
   saved_cur_token = pfile->cur_token;
 
   if (macro->fun_like)
index e8f7e9e7a68732925f79d5de0d8683ba211540ed..1d7dfd623e1378bd4aeb838b1c70a08aa0ec4071 100644 (file)
@@ -4228,15 +4228,11 @@ linemarkers.  @xref{Preprocessor Output}.
 @item -C
 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.
-
-You should be prepared for side effects when using @option{-C}; 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
+along with the directive.
+
+You should be prepared for side effects when using @option{-C}; it
+causes the preprocessor to treat comments as tokens in their own right.
+For example, 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 @samp{#}.