From 360e86f1eb32c6bd7569a9f02e823f499fbee66a Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 10 May 2005 07:45:11 +0000 Subject: gas/ 2005-05-10 Jan Beulich * read.c (s_macro): Move local variable 'local' to smaller scope. Call sb_kill on it when done. --- gas/ChangeLog | 5 +++++ gas/read.c | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index a8efca8..1825b4a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-05-10 Jan Beulich + + * read.c (s_macro): Move local variable 'local' to smaller scope. + Call sb_kill on it when done. + 2005-05-09 Jan Beulich * config/tc-i386.c (optimize_disp): Discard displacement entirely when zero and diff --git a/gas/read.c b/gas/read.c index 2165edf..fa31f4a 100644 --- a/gas/read.c +++ b/gas/read.c @@ -2348,7 +2348,6 @@ s_macro (int ignore ATTRIBUTE_UNUSED) char *file; unsigned int line; sb s; - sb label; const char *err; const char *name; @@ -2358,11 +2357,17 @@ s_macro (int ignore ATTRIBUTE_UNUSED) while (!is_end_of_line[(unsigned char) *input_line_pointer]) sb_add_char (&s, *input_line_pointer++); - sb_new (&label); if (line_label != NULL) - sb_add_string (&label, S_GET_NAME (line_label)); + { + sb label; - err = define_macro (0, &s, &label, get_line_sb, file, line, &name); + sb_new (&label); + sb_add_string (&label, S_GET_NAME (line_label)); + err = define_macro (0, &s, &label, get_line_sb, file, line, &name); + sb_kill (&label); + } + else + err = define_macro (0, &s, NULL, get_line_sb, file, line, &name); if (err != NULL) as_bad_where (file, line, err, name); else -- cgit v1.1