[PATCH 04/11] gas: don't open-code IS_WHITESPACE() / IS_NEWLINE()
Jan Beulich
jbeulich@suse.com
Fri Jun 28 13:18:49 GMT 2024
Better be consistent in use of the wrapper macros, which imo also helps
readability.
---
I'm wondering about LEX_IS_COLON, which has no corresponding IS_COLON():
Do we really need this? IOW do we really expect architectures may be
using other than a colon (and other than nothing at all) to "terminate"
a label definition?
--- a/gas/app.c
+++ b/gas/app.c
@@ -819,7 +819,7 @@ do_scrub_chars (size_t (*get) (char *, s
if (ch != '\0'
&& (*mri_state == ch
|| (*mri_state == ' '
- && lex[ch] == LEX_IS_WHITESPACE)
+ && IS_WHITESPACE (ch))
|| (*mri_state == '0'
&& ch == '1')))
{
@@ -827,8 +827,7 @@ do_scrub_chars (size_t (*get) (char *, s
++mri_state;
}
else if (*mri_state != '\0'
- || (lex[ch] != LEX_IS_WHITESPACE
- && lex[ch] != LEX_IS_NEWLINE))
+ || (!IS_WHITESPACE (ch) && !IS_NEWLINE (ch)))
{
/* We did not get the expected character, or we didn't
get a valid terminating character after seeing the
More information about the Binutils
mailing list