[binutils-gdb] RISC-V: improve a subset parsing diagnostic

Jan Beulich via Binutils-cvs <[email protected]>
Newsgroups gmane.comp.gnu.binutils.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e7a2aea6d0d8dd59efc148c3f65ab79a7798ae2e

commit e7a2aea6d0d8dd59efc148c3f65ab79a7798ae2e
Author: Jan Beulich <[email protected]>
Date:   Fri May 15 09:47:18 2026 +0200

    RISC-V: improve a subset parsing diagnostic
    
    These sets can be long, so report the specific item along with the full
    argument.
    
    Reviewed-by: Jiawei <[email protected]>

Diff:
---
 bfd/elfxx-riscv.c                          | 4 ++--
 gas/testsuite/gas/riscv/option-arch-fail.l | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index 030f27da5d9..4b3b878d6c7 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -2688,8 +2688,8 @@ riscv_update_subset1 (riscv_parse_subset_t *rps,
 	{
 	  *q = '\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;
 	}
diff --git a/gas/testsuite/gas/riscv/option-arch-fail.l b/gas/testsuite/gas/riscv/option-arch-fail.l
index 191f088c21b..4aa35dba831 100644
--- 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.