[16/19] RISC-V: improve a subset parsing diagnostic

Message ID 2c2be0f6-4622-4a79-95ac-90c18a143b68@suse.com
State New
Headers
Series RISC-V: assorted fixes and (hopefully) improvements |

Commit Message

Jan Beulich April 21, 2026, 11:56 a.m. UTC
  These sets can be long, so report the specific item along with the full
argument.
  

Patch

--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -2688,8 +2688,8 @@  riscv_update_subset1 (riscv_parse_subset
 	{
 	  q[1] = '\0';
 	  rps->error_handler
-	    (_("%sinvalid ISA extension ends with <number>p in %s `%s'"),
-	       errmsg_internal, errmsg_caller, implicit_exts);
+	    (_("%sinvalid ISA extension `%s' ends with <number>p in %s `%s'"),
+	       errmsg_internal, subset, errmsg_caller, implicit_exts);
 	  free (subset);
 	  return false;
 	}
--- a/gas/testsuite/gas/riscv/option-arch-fail.l
+++ b/gas/testsuite/gas/riscv/option-arch-fail.l
@@ -7,5 +7,5 @@ 
 .*Error: unknown ISA extension `zsubset' in .option arch `\+zsubset2p0'
 .*Error: unknown ISA extension `f2p0_d' in .option arch `\+f2p0_d2p0'
 .*Error: unknown ISA extension `' in .option arch `\+'
-.*Error: invalid ISA extension ends with <number>p in .option arch `\+xvendor2p'
+.*Error: invalid ISA extension `xvendor2p' ends with <number>p in .option arch `\+xvendor2p'
 .*Error: .option pop with no .option push