https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71651
--- Comment #5 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Author: dmalcolm Date: Thu Jun 30 14:39:10 2016 New Revision: 237881 URL: https://gcc.gnu.org/viewcvs?rev=237881&root=gcc&view=rev Log: Fix bogus option suggestions for RejectNegative options (PR driver/71651) gcc/ChangeLog: Backport from trunk r237880. 2016-06-30 David Malcolm <dmalc...@redhat.com> PR driver/71651 * gcc.c (driver::build_option_suggestions): Pass "option" to add_misspelling_candidates. * opts-common.c (add_misspelling_candidates): Add "option" param; use it to avoid adding negated forms for options marked with RejectNegative. * opts.h (add_misspelling_candidates): Add "option" param. gcc/testsuite/ChangeLog: Backport from trunk r237880. 2016-06-30 David Malcolm <dmalc...@redhat.com> PR driver/71651 * gcc.dg/spellcheck-options-12.c: New test case. Added: branches/gcc-6-branch/gcc/testsuite/gcc.dg/spellcheck-options-12.c Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/gcc.c branches/gcc-6-branch/gcc/opts-common.c branches/gcc-6-branch/gcc/opts.h branches/gcc-6-branch/gcc/testsuite/ChangeLog