On 11/9/20 8:22 AM, Matthew Malcomson via Gcc-patches wrote: > 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". > > Bootstrapped and regtested on AArch64 without any problems. > 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.
Given how mechanical this is, I only spot-checked the changes. If you find more, consider similar changes pre-approved. OK for the trunk. jeff