aboutsummaryrefslogtreecommitdiff
path: root/gas/expr.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-11-11 15:13:07 +0000
committerNick Clifton <nickc@redhat.com>2016-11-11 15:13:07 +0000
commit86b80085c889cd388fa677a5ae9053fd4be3776c (patch)
treed00fdbb685829875060e7cc63db5da91ade39ef6 /gas/expr.c
parent2f7d995359c7f280431f015726485ca421b0a65a (diff)
downloadgdb-86b80085c889cd388fa677a5ae9053fd4be3776c.zip
gdb-86b80085c889cd388fa677a5ae9053fd4be3776c.tar.gz
gdb-86b80085c889cd388fa677a5ae9053fd4be3776c.tar.bz2
Accept L and LL suffixes to integer constants.
PR gas/20732 * expr.c (integer_constant): If tc_allow_L_suffix is defined and non-zero then accept a L or LL suffix. * testsuite/gas/sparc/pr20732.d: New test source file. * testsuite/gas/sparc/pr20732.d: New test output file. * testsuite/gas/sparc/sparc.exp: Run new test.
Diffstat (limited to 'gas/expr.c')
-rw-r--r--gas/expr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gas/expr.c b/gas/expr.c
index 1cdd081..e8d553d 100644
--- a/gas/expr.c
+++ b/gas/expr.c
@@ -515,6 +515,14 @@ integer_constant (int radix, expressionS *expressionP)
if (tc_allow_U_suffix && (c == 'U' || c == 'u'))
c = * input_line_pointer++;
+#ifndef tc_allow_L_suffix
+#define tc_allow_L_suffix 1
+#endif
+ /* PR 20732: Look for, and ignore, a L or LL suffix to the number. */
+ if (tc_allow_L_suffix)
+ while (c == 'L' || c == 'l')
+ c = * input_line_pointer++;
+
if (small)
{
/* Here with number, in correct radix. c is the next char.