]> gcc.gnu.org Git - gcc.git/commitdiff
(discard_comments): Replace comments with a single space.
authorJim Wilson <wilson@gcc.gnu.org>
Wed, 6 Apr 1994 23:01:45 +0000 (16:01 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 6 Apr 1994 23:01:45 +0000 (16:01 -0700)
From-SVN: r6993

gcc/cccp.c

index 1901cf6059ccd716c687581c4b12263bd5d1eec8..1380d201c9b4029e0350b2c94a88a75bbcc1eb0f 100644 (file)
@@ -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] == '*'
This page took 0.082033 seconds and 5 git commands to generate.