aboutsummaryrefslogtreecommitdiff
path: root/gas/expr.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-06-02 02:52:10 +0000
committerAlan Modra <amodra@gmail.com>2000-06-02 02:52:10 +0000
commitb75c0c920f88f3b6a5877509b14f59b5d86f88b5 (patch)
treefbdf3fdb737ae2096200576af5b22eb8817603af /gas/expr.c
parentf0d4cc9e0ec5ad1533782d32bbf5029b2601828f (diff)
downloadgdb-b75c0c920f88f3b6a5877509b14f59b5d86f88b5.zip
gdb-b75c0c920f88f3b6a5877509b14f59b5d86f88b5.tar.gz
gdb-b75c0c920f88f3b6a5877509b14f59b5d86f88b5.tar.bz2
is_end_of_line fixes.
Diffstat (limited to 'gas/expr.c')
-rw-r--r--gas/expr.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gas/expr.c b/gas/expr.c
index 851a406..11a9e13 100644
--- a/gas/expr.c
+++ b/gas/expr.c
@@ -799,6 +799,9 @@ operand (expressionP)
SKIP_WHITESPACE (); /* leading whitespace is part of operand. */
c = *input_line_pointer++; /* input_line_pointer->past char in c. */
+ if (is_end_of_line[(unsigned char) c])
+ goto eol;
+
switch (c)
{
case '1':
@@ -1166,9 +1169,8 @@ operand (expressionP)
{
goto isname;
}
+
case ',':
- case '\n':
- case '\0':
eol:
/* can't imagine any other kind of operand */
expressionP->X_op = O_absent;
@@ -1211,8 +1213,6 @@ operand (expressionP)
#ifdef TC_M68K
de_fault:
#endif
- if (is_end_of_line[(unsigned char) c])
- goto eol;
if (is_name_beginner (c)) /* here if did not begin with a digit */
{
/*
@@ -1571,6 +1571,9 @@ operator ()
c = *input_line_pointer & 0xff;
+ if (is_end_of_line[c])
+ return O_illegal;
+
switch (c)
{
default: