From: Richard Kenner Date: Mon, 15 Aug 1994 23:26:36 +0000 (-0400) Subject: (rescan, do_ident): Pass more accurate size request to check_expand. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b415f25eef56f3f037a1cbdcfe5ceec98138f8a6;p=gcc.git (rescan, do_ident): Pass more accurate size request to check_expand. From-SVN: r7933 --- diff --git a/gcc/cccp.c b/gcc/cccp.c index b62c2da1690..3ba2bfb6e06 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;