[04/11] gas: don't open-code IS_WHITESPACE() / IS_NEWLINE()

Message ID 8fc126fb-f33b-4b3a-a405-fc5ad6ead795@suse.com
State Superseded
Headers
Series gas: scrubber adjustments |

Commit Message

Jan Beulich June 28, 2024, 1:18 p.m. UTC
  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?
  

Patch

--- 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