[v2,03/65] Alpha/EVAX: use is_whitespace() / is_end_of_stmt()

Message ID badf53f3-92c1-4d9d-a077-60579fdf848e@suse.com
State New
Headers
Series gas: whitespace handling |

Commit Message

Jan Beulich Jan. 27, 2025, 3:43 p.m. UTC
  Don't open-code checking for ' ', '\t', and statement ending chars.
---
The code being touched looks suspicious: I expect it ought to use
get_symbol_name() rather than blindly consuming everything that's non-
whitespace, non-comma, non-statement-separator. Yet then I notice
obj_elf_section_name() does the same.

There also looks to be a demand_empty_rest_of_line() missing.
---
v2: New.
  

Patch

--- a/gas/config/tc-alpha.c
+++ b/gas/config/tc-alpha.c
@@ -4201,7 +4201,7 @@  s_alpha_section_name (void)
     {
       char *end = input_line_pointer;
 
-      while (0 == strchr ("\n\t,; ", *end))
+      while (!is_whitespace (*end) && !is_end_of_stmt (*end) && *end != ',')
 	end++;
       if (end == input_line_pointer)
 	{