From 18e2b1c06ed8c34393fb517d1ff4d27bd04389f8 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Wed, 6 Apr 1994 16:01:45 -0700 Subject: [PATCH] (discard_comments): Replace comments with a single space. From-SVN: r6993 --- gcc/cccp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/cccp.c b/gcc/cccp.c index 1901cf6059c..1380d201c9b 100644 --- a/gcc/cccp.c +++ b/gcc/cccp.c @@ -8170,14 +8170,16 @@ discard_comments (start, length, newlines) newline_fix (ibp); /* Delete any comment. */ if (cplusplus_comments && ibp[0] == '/') { - obp--; + /* Comments are equivalent to spaces. */ + obp[-1] = ' '; ibp++; while (ibp < limit && *ibp++ != '\n') ; break; } if (ibp[0] != '*' || ibp + 1 >= limit) break; - obp--; + /* Comments are equivalent to spaces. */ + obp[-1] = ' '; ibp++; while (ibp + 1 < limit) { if (ibp[0] == '*' -- 2.30.2