[06/19] bfd/RISC-V: correct grammar of conflict diagnostics

Message ID 2a36b6b0-3b92-4b92-8da1-3a03bd4ba221@suse.com
State New
Headers
Series RISC-V: assorted fixes and (hopefully) improvements |

Commit Message

Jan Beulich April 21, 2026, 11:51 a.m. UTC
  ---
The extensions mentioned in the diagnostics can also be irritating, as one
may not have enabled the specific one(s) mentioned. At the example of
Zfinx, if only F was mentioned in the latter part of the message, that
would at least be self-consistent.

Furthermore the wording (particularly for uses in gas) suggests that the
extension mentioned first is what was enabled last. Alternative, less
suggestive wording may be "A and B conflict with one another".

The usage in gas has another related issue, though: Subsets are added
before checking for conflicts, hence e.g. for Z*inx the FPR form insns are
then causing errors, irrespective of the order of .option directives (i.e.
no matter which extensions were successfully enabled). Question is whether
this infrastructure is actually well suited for use by gas.
  

Patch

--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -2245,14 +2245,14 @@  riscv_parse_check_conflicts (riscv_parse
       && riscv_lookup_subset (rps->subset_list, "f", &subset))
     {
       rps->error_handler
-	(_("`zfinx' is conflict with the `f/d/q/zfh/zfhmin' extension"));
+	(_("`zfinx' conflicts with the `f/d/q/zfh/zfhmin' extension"));
       no_conflict = false;
     }
   if (riscv_lookup_subset (rps->subset_list, "xtheadvector", &subset)
       && riscv_lookup_subset (rps->subset_list, "zve32x", &subset))
     {
       rps->error_handler
-	(_("`xtheadvector' is conflict with the `v/zve32x' extension"));
+	(_("`xtheadvector' conflicts with the `v/zve32x' extension"));
       no_conflict = false;
     }
   if (riscv_lookup_subset (rps->subset_list, "zclsd", &subset)
@@ -2261,7 +2261,7 @@  riscv_parse_check_conflicts (riscv_parse
 	  || riscv_lookup_subset (rps->subset_list, "zcf", &subset)))
     {
       rps->error_handler
-	(_("`zclsd' is conflict with the `c+f'/ `zcf' extension"));
+	(_("`zclsd' conflicts with the `c+f'/`zcf' extension"));
       no_conflict = false;
     }
   if (riscv_lookup_subset (rps->subset_list, "ssnpm", &subset) && xlen != 64)
--- a/gas/testsuite/gas/riscv/x-thead-vector-fail.l
+++ b/gas/testsuite/gas/riscv/x-thead-vector-fail.l
@@ -1,2 +1,2 @@ 
 Assembler messages:
-Error: `xtheadvector' is conflict with the `v/zve32x' extension
+Error: `xtheadvector' conflicts with the `v/zve32x' extension