This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 5/6] gas/arc: Allow greater range of characters into flag names


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]