aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-07-01 15:52:27 +0000
committerNick Clifton <nickc@redhat.com>2009-07-01 15:52:27 +0000
commita87a00ea43681b9310995d15ce68d2e3906c6e93 (patch)
treeb2f0f0770b81128a1f8336c5cb113c57c1f1a33b /binutils
parentefde2f2ce489a733f5489325437dfadbf948ea62 (diff)
downloadfsf-binutils-gdb-a87a00ea43681b9310995d15ce68d2e3906c6e93.zip
fsf-binutils-gdb-a87a00ea43681b9310995d15ce68d2e3906c6e93.tar.gz
fsf-binutils-gdb-a87a00ea43681b9310995d15ce68d2e3906c6e93.tar.bz2
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')
-rw-r--r--binutils/ChangeLog8
-rw-r--r--binutils/rclex.c18
2 files changed, 23 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 0ff041f..9e50559 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,11 @@
+2009-07-01 Nick Clifton <nickc@redhat.com>
+
+ 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.
+
2009-06-27 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10321
diff --git a/binutils/rclex.c b/binutils/rclex.c
index 4fae3da..9b58af1 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