[PATCH v2 03/65] Alpha/EVAX: use is_whitespace() / is_end_of_stmt()
Jan Beulich
jbeulich@suse.com
Mon Jan 27 15:43:36 GMT 2025
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.
--- 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)
{
More information about the Binutils
mailing list