diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-04-06 16:01:45 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-04-06 16:01:45 -0700 |
commit | 18e2b1c06ed8c34393fb517d1ff4d27bd04389f8 (patch) | |
tree | 2333d9c5f293d513197472f69fe338d2f1a55436 | |
parent | 1e0181030e9ca94c59ccac1d244d5d7678a49209 (diff) | |
download | gcc-18e2b1c06ed8c34393fb517d1ff4d27bd04389f8.zip gcc-18e2b1c06ed8c34393fb517d1ff4d27bd04389f8.tar.gz gcc-18e2b1c06ed8c34393fb517d1ff4d27bd04389f8.tar.bz2 |
(discard_comments): Replace comments with a single space.
From-SVN: r6993
-rw-r--r-- | gcc/cccp.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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] == '*' |