aboutsummaryrefslogtreecommitdiff
path: root/gas/read.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-12-05 16:54:59 +0000
committerNick Clifton <nickc@redhat.com>2016-12-05 16:54:59 +0000
commit14c1428b29fff12d8119ce6f4703be0de08197af (patch)
tree4bc8d41cda22f8be57a3c2ed003ceab8bc2322ea /gas/read.h
parentfa6631b4eecfcca00c13b9594e6336dffd40982f (diff)
downloadgdb-14c1428b29fff12d8119ce6f4703be0de08197af.zip
gdb-14c1428b29fff12d8119ce6f4703be0de08197af.tar.gz
gdb-14c1428b29fff12d8119ce6f4703be0de08197af.tar.bz2
Fix ICE in assembler when passed a bogus input file.
PR gas/20904 * as.h (SKIP_ALL_WHITESPACE): New macro. * expr.c (operand): Use it.
Diffstat (limited to 'gas/read.h')
-rw-r--r--gas/read.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gas/read.h b/gas/read.h
index e0cb646..0a3ebf6 100644
--- a/gas/read.h
+++ b/gas/read.h
@@ -29,8 +29,11 @@ extern char *input_line_pointer; /* -> char we are parsing now. */
#ifdef PERMIT_WHITESPACE
#define SKIP_WHITESPACE() \
((*input_line_pointer == ' ') ? ++input_line_pointer : 0)
+#define SKIP_ALL_WHITESPACE() \
+ while (*input_line_pointer == ' ') ++input_line_pointer
#else
-#define SKIP_WHITESPACE() know(*input_line_pointer != ' ' )
+#define SKIP_WHITESPACE() know (*input_line_pointer != ' ' )
+#define SKIP_ALL_WHITESPACE() SKIP_WHITESPACE()
#endif
#define SKIP_WHITESPACE_AFTER_NAME() \