This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch][Aarch64][PR target/79924] Cannot translate diagnostics


Steve Ellcey <sellcey@cavium.com> writes:
> @@ -1029,13 +1029,18 @@ aarch64_gen_far_branch (rtx * operands, int pos_label, const char * dest,
>  }
>  
>  void
> -aarch64_err_no_fpadvsimd (machine_mode mode, const char *msg)
> +aarch64_err_no_fpadvsimd (machine_mode mode)
>  {
> -  const char *mc = FLOAT_MODE_P (mode) ? "floating-point" : "vector";
>    if (TARGET_GENERAL_REGS_ONLY)
> -    error ("%qs is incompatible with %s %s", "-mgeneral-regs-only", mc, msg);
> +    if (FLOAT_MODE_P (mode))
> +      error ("-mgeneral-regs-only is incompatible with the use of floating point types");
> +    else
> +      error ("-mgeneral-regs-only is incompatible with the use of vector types");
>    else
> -    error ("%qs feature modifier is incompatible with %s %s", "+nofp", mc, msg);
> +    if (FLOAT_MODE_P (mode))
> +      error ("+nofp feature modifier is incompatible with the use of floating point types");
> +    else
> +      error ("+nofp feature modifier is incompatible with the use of vector types");

This regresses a couple of things:

- before the patch, the option would be properly quoted, whereas now
  it's unquoted.  Either keeping %qs or using %<...%> would fix that.
  Using %qs is probably nicer since we can reuse the translation for any
  other options or features that end up being incompatible.

- "floating-point" is preferred for modifiers over "floating point".

- some lines are now longer than 80 chars.

Patch LGTM otherwise, but someone else will need to approve.

Thanks,
Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]