aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-08-15 19:26:36 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-08-15 19:26:36 -0400
commitb415f25eef56f3f037a1cbdcfe5ceec98138f8a6 (patch)
treeccd919470488ce3eb5a915d5ea2949985ba9bcc2
parent115ee3598d94d841e86efb9e1ffbbf2e15f18e2c (diff)
downloadgcc-b415f25eef56f3f037a1cbdcfe5ceec98138f8a6.zip
gcc-b415f25eef56f3f037a1cbdcfe5ceec98138f8a6.tar.gz
gcc-b415f25eef56f3f037a1cbdcfe5ceec98138f8a6.tar.bz2
(rescan, do_ident): Pass more accurate size request to check_expand.
From-SVN: r7933
-rw-r--r--gcc/cccp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index b62c2da..3ba2bfb 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -2811,7 +2811,7 @@ do { ip = &instack[indepth]; \
if (lintcmd != NULL) {
op->bufp = obp;
- check_expand (op, 13 + cmdlen);
+ check_expand (op, cmdlen + arglen + 14);
obp = op->bufp;
/* I believe it is always safe to emit this newline: */
obp[-1] = '\n';
@@ -2831,7 +2831,7 @@ do { ip = &instack[indepth]; \
messes up the line count. */
op->bufp = obp;
output_line_command (ip, op, 0, same_file);
- check_expand (op, ip->length - (ip->bufp - ip->buf));
+ check_expand (op, limit - ibp + 2);
obp = op->bufp;
*(obp++) = '/';
}
@@ -3013,7 +3013,7 @@ do { ip = &instack[indepth]; \
if (ip->lineno != op->lineno) {
op->bufp = obp;
output_line_command (ip, op, 1, same_file);
- check_expand (op, ip->length - (ip->bufp - ip->buf));
+ check_expand (op, limit - ibp);
obp = op->bufp;
}
break;
@@ -6585,7 +6585,7 @@ do_ident (buf, limit)
free (trybuf.buf);
/* Output directive name. */
- check_expand (op, 8);
+ check_expand (op, 7);
bcopy ("#ident ", (char *) op->bufp, 7);
op->bufp += 7;