This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch][Aarch64][PR target/79924] Cannot translate diagnostics
- From: Richard Sandiford <richard dot sandiford at linaro dot org>
- To: Steve Ellcey <sellcey at cavium dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "james.greenhalgh" <james dot greenhalgh at arm dot com>, "richard.earnshaw" <richard dot earnshaw at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Tue, 05 Jun 2018 13:23:52 +0100
- Subject: Re: [Patch][Aarch64][PR target/79924] Cannot translate diagnostics
- References: <1515714296.8647.7.camel@cavium.com>
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