gas: make fix_new_exp()'s "exp" parameter const

This really should be only an input; in particular it looks bogus that
O_add expressions are even altered. That altering and the recursion are
even pointless: Once expanding what the inner call would do (with
O_symbol) it becomes clear that this is no different than the default
case. Simplify the code accordingly, retaining the comment.
This commit is contained in:
Jan Beulich
2024-10-29 08:08:29 +01:00
parent 641cf0e2c0
commit c1a4b47e2a
2 changed files with 4 additions and 16 deletions

View File

@@ -187,7 +187,7 @@ extern fixS *fix_new (fragS *, unsigned long, unsigned long, symbolS *,
extern fixS *fix_at_start (fragS *, unsigned long, symbolS *,
offsetT, int, bfd_reloc_code_real_type);
extern fixS *fix_new_exp (fragS *, unsigned long, unsigned long,
expressionS *, int, bfd_reloc_code_real_type);
const expressionS *, int, bfd_reloc_code_real_type);
extern void write_print_statistics (FILE *);
extern void as_bad_subtract (fixS *);