This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 5/6] gas/arc: Allow greater range of characters into flag names
- From: Andrew Burgess <andrew dot burgess at embecosm dot com>
- To: binutils at sourceware dot org
- Cc: Claudiu dot Zissulescu at synopsys dot com, noamca at mellanox dot com, Andrew Burgess <andrew dot burgess at embecosm dot com>
- Date: Sat, 2 Apr 2016 23:51:09 +0100
- Subject: [PATCH 5/6] gas/arc: Allow greater range of characters into flag names
- Authentication-results: sourceware.org; auth=none
- References: <1459637470-30538-1-git-send-email-andrew dot burgess at embecosm dot com>
There's little point limiting the characters that can be accepted into
flag names. It does mean earlier error detection, but invalid flags
will be detected later in the process anyway, and limiting the
acceptable character range earlier only means that when a new flag is
added that uses a previously unused character the programmer must
remember to update this part of the assembler.
For now all alpha-numeric characters seems like a reasonable set to
allow.
gas/ChangeLog:
* config/tc-arc.c (tokenize_flags): Allow greater range of
characters into flag names.
---
gas/ChangeLog | 5 +++++
gas/config/tc-arc.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 45bf30f..4fd5403 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -1152,7 +1152,8 @@ tokenize_flags (const char *str,
if (num_flags >= nflg)
goto err;
- flgnamelen = strspn (input_line_pointer, "abcdefghilmnopqrstvwxz");
+ flgnamelen = strspn (input_line_pointer,
+ "abcdefghijklmnopqrstuvwxyz0123456789");
if (flgnamelen > MAX_FLAG_NAME_LENGTH)
goto err;
--
2.5.1