opts: Change `is incompatible with` messages to have standard parametrised form
Hello,
In a recent review for one of the hwasan patches Richard S. noticed there are
quite a few errors of the form "%<someflag%> is incompatible with
<otherflag%>".
https://gcc.gnu.org/pipermail/gcc-patches/2020-October/556137.html
In order to avoid this creating extra work for translators we would like to
change these error messages to use the form "%qs is incompatible with %qs" and
pass the flag as format arguments.
This patch implements that change.
There is only one change in the output the compiler produces from this patch,
an error message of "-fsanitize=address and -fsanitize=kernel-address are
incompatible with -fsanitize=thread" has been changed to "-fsanitize=thread is
incompatible with -fsanitize=address|kernel-address".
This matches the similar error messages for live patching which use the
messages "-f<something> is incompatible with
-flive-patching=inline-only-static|inline-clone".
Ok for trunk?
gcc/ChangeLog:
* opts.c (control_options_for_live_patching): Reform 'is incompatible
with' error messages to use a standard message with differing format
arguments.
(finish_options): Likewise.
gcc/testsuite/ChangeLog:
* c-c++-common/ubsan/sanitize-recover-7.c: Update testcase.