From c5c834aac9bc219aff5d32713e12d683f57ce176 Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Tue, 9 Nov 1999 17:14:45 +0000 Subject: [PATCH] 1999-11-08 Andrew Haley * app.c (do_scrub_chars): When in State 10, treat backslash characters in the same way as as symbol characters. --- gas/ChangeLog | 5 +++++ gas/app.c | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index f21f66d2cf7..edad0dfa00f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +1999-11-08 Andrew Haley + + * app.c (do_scrub_chars): When in State 10, treat backslash + characters in the same way as as symbol characters. + 1999-11-07 Richard Henderson * config/tc-alpha.c (alpha_align): Check, don't assert, that diff --git a/gas/app.c b/gas/app.c index 0494aec23b6..73d579dfe5d 100644 --- a/gas/app.c +++ b/gas/app.c @@ -1227,6 +1227,23 @@ do_scrub_chars (get, tostart, tolen) } else if (state == 10) { + if (ch == '\\') + { + /* Special handling for backslash: a backslash may + be the beginning of a formal parameter (of a + macro) following another symbol character, with + whitespace in between. If that is the case, we + output a space before the parameter. Strictly + speaking, correct handling depends upon what the + macro parameter expands into; if the parameter + expands into something which does not start with + an operand character, then we don't want to keep + the space. We don't have enough information to + make the right choice, so here we are making the + choice which is more likely to be correct. */ + PUT (' '); + } + state = 3; } PUT (ch); -- 2.30.2