Commit 4f88a538 by Richard Kenner

(output_line_command): Use alloca for line_cmd_buf.

From-SVN: r2837
parent fa7d8b92
...@@ -6784,7 +6784,7 @@ output_line_command (ip, op, conditional, file_change) ...@@ -6784,7 +6784,7 @@ output_line_command (ip, op, conditional, file_change)
enum file_change_code file_change; enum file_change_code file_change;
{ {
int len; int len;
char line_cmd_buf[500]; char *line_cmd_buf;
if (no_line_commands if (no_line_commands
|| ip->fname == NULL || ip->fname == NULL
...@@ -6816,6 +6816,7 @@ output_line_command (ip, op, conditional, file_change) ...@@ -6816,6 +6816,7 @@ output_line_command (ip, op, conditional, file_change)
ip->bufp++; ip->bufp++;
} }
line_cmd_buf = (char *) alloca (strlen (ip->nominal_fname) + 100);
#ifdef OUTPUT_LINE_COMMANDS #ifdef OUTPUT_LINE_COMMANDS
sprintf (line_cmd_buf, "#line %d \"%s\"", ip->lineno, ip->nominal_fname); sprintf (line_cmd_buf, "#line %d \"%s\"", ip->lineno, ip->nominal_fname);
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment