summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-08 20:05:36 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-08 20:05:36 +0000
commit04bff562bcdcf4bc15d621283e8579a59af09912 (patch)
tree806a98f2203cf12ec34e9d9a0011d35b9bb27a4a
parent7cb6c162b628563c0a7308ac3bf74b3fb22135ba (diff)
downloadgcc-04bff562bcdcf4bc15d621283e8579a59af09912.tar.gz
* cppmacro.c (_cpp_create_definition): Leave comments off.
* doc/cpp.texi: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46089 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cppmacro.c1
-rw-r--r--gcc/doc/cpp.texi14
3 files changed, 11 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4387656675d..888d8148f0a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index 221682e97d7..4a30831afd2 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -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)
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi
index e8f7e9e7a68..1d7dfd623e1 100644
--- a/gcc/doc/cpp.texi
+++ b/gcc/doc/cpp.texi
@@ -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{#}.