https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105564
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Liska <mar...@gcc.gnu.org>: https://gcc.gnu.org/g:ab66fd016d8efa250c471692f826b07e4a55e237 commit r13-1128-gab66fd016d8efa250c471692f826b07e4a55e237 Author: Martin Liska <mli...@suse.cz> Date: Wed May 11 16:07:25 2022 +0200 opts: improve option suggestion 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. PR driver/105564 gcc/ChangeLog: * spellcheck.cc (test_find_closest_string): Add new test. * spellcheck.h (class best_match): Prefer a difference in trailing sign symbol.