Re: [PATCH] opts: improve option suggestion

2022-06-14 Thread Jeff Law via Gcc-patches
On 5/24/2022 2:45 AM, Martin Liška wrote: PING^1 On 5/12/22 09:10, Martin Liška wrote: On 5/11/22 20:49, David Malcolm wrote: On Wed, 2022-05-11 at 16:49 +0200, Martin Liška wrote: In case where we have 2 equally good candidates like -ftrivial-auto-var-init= -Wtrivial-auto-var-init for -f

Re: [PATCH] opts: improve option suggestion

2022-05-24 Thread Martin Liška
PING^1 On 5/12/22 09:10, Martin Liška wrote: > On 5/11/22 20:49, David Malcolm wrote: >> On Wed, 2022-05-11 at 16:49 +0200, Martin Liška wrote: >>> In case where we have 2 equally good candidates like >>> -ftrivial-auto-var-init= >>> -Wtrivial-auto-var-init >>> >>> for -ftrivial-auto-var-init, we

Re: [PATCH] opts: improve option suggestion

2022-05-12 Thread Martin Liška
;s a difference in the trailing sign char. > What if both the candidate and the > current best both add a trailing equal sign? Then there's a difference somewhere else, and we would follow edit_distance_t. > > I find the array access of the final character suspicious - is there &g

Re: [PATCH] opts: improve option suggestion

2022-05-12 Thread Richard Biener via Gcc-patches
On Wed, May 11, 2022 at 8:50 PM David Malcolm via Gcc-patches wrote: > > On Wed, 2022-05-11 at 16:49 +0200, Martin Liška wrote: > > In case where we have 2 equally good candidates like > > -ftrivial-auto-var-init= > > -Wtrivial-auto-var-init > > > > for -ftrivial-auto-var-init, we should take the

Re: [PATCH] opts: improve option suggestion

2022-05-11 Thread David Malcolm via Gcc-patches
On Wed, 2022-05-11 at 16:49 +0200, Martin Liška wrote: > In case where we have 2 equally good candidates like > -ftrivial-auto-var-init= > -Wtrivial-auto-var-init > > for -ftrivial-auto-var-init, we should take the candidate that > has a difference in trailing sign symbol. > > Patch can bootstrap

[PATCH] opts: improve option suggestion

2022-05-11 Thread Martin Liška
In case where we have 2 equally good candidates like -ftrivial-auto-var-init= -Wtrivial-auto-var-init for -ftrivial-auto-var-init, we should take the candidate that has a difference in trailing sign symbol. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be instal