diff options
author | Nick Clifton <nickc@redhat.com> | 2009-07-01 15:52:27 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-07-01 15:52:27 +0000 |
commit | 3a0a9b2bba77a22a4881a4c812bb46d8785ac921 (patch) | |
tree | 778b24dba161834875c9cad505e47fe9995e192b /binutils/rclex.c | |
parent | dfb3cbd3424613934cc084923327477b874f77d6 (diff) | |
download | binutils-redhat-3a0a9b2bba77a22a4881a4c812bb46d8785ac921.tar.gz |
PR 6714
* rclex.c (handle_quotes): Do not complain about whitespace
separating quoted strings.
(rclex_string): Ignore whitespace when looking for a new opening
quote following a closing quote.
Diffstat (limited to 'binutils/rclex.c')
-rw-r--r-- | binutils/rclex.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/binutils/rclex.c b/binutils/rclex.c index 4fae3da512..9b58af1788 100644 --- a/binutils/rclex.c +++ b/binutils/rclex.c @@ -390,9 +390,9 @@ handle_quotes (rc_uint_type *len) } else { - rcparse_warning ("unexpected character after '\"'"); ++t; - assert (ISSPACE (*t)); + if (! ISSPACE (*t)) + rcparse_warning ("unexpected character after '\"'"); while (ISSPACE (*t)) { if ((*t) == '\n') @@ -679,7 +679,7 @@ static void rclex_string (void) { int c; - + while ((c = rclex_peekch ()) != -1) { if (c == '\n') @@ -693,6 +693,18 @@ rclex_string (void) } else if (rclex_readch () == '"') { + /* PR 6714 + Skip any whitespace after the end of the double quotes. */ + do + { + c = rclex_peekch (); + if (ISSPACE (c)) + rclex_readch (); + else + c = -1; + } + while (c != -1); + if (rclex_peekch () == '"') rclex_readch (); else |