PR driver/78863
* gcc.c (driver::build_option_suggestions): Do not add
-fsanitize=all as a suggestion candidate.
PR driver/78863
* gcc.dg/spellcheck-options-13.c: New test.
From-SVN: r243857
+2016-12-21 Jakub Jelinek <jakub@redhat.com>
+ Martin Liska <mliska@suse.cz>
+
+ PR driver/78863
+ * gcc.c (driver::build_option_suggestions): Do not add
+ -fsanitize=all as a suggestion candidate.
+
2016-12-21 Alexander Monakov <amonakov@ispras.ru>
PR target/78831
{
for (int j = 0; sanitizer_opts[j].name != NULL; ++j)
{
+ struct cl_option optb;
+ /* -fsanitize=all is not valid, only -fno-sanitize=all.
+ So don't register the positive misspelling candidates
+ for it. */
+ if (sanitizer_opts[j].flag == ~0U && i == OPT_fsanitize_)
+ {
+ optb = *option;
+ optb.opt_text = opt_text = "-fno-sanitize=";
+ optb.cl_reject_negative = true;
+ option = &optb;
+ }
/* Get one arg at a time e.g. "-fsanitize=address". */
char *with_arg = concat (opt_text,
sanitizer_opts[j].name,
+2016-12-21 Martin Liska <mliska@suse.cz>
+
+ PR driver/78863
+ * gcc.dg/spellcheck-options-13.c: New test.
+
2016-12-21 Alexander Monakov <amonakov@ispras.ru>
* gcc.target/nvptx/decl-shared.c (v_common): Add 'common' attribute to
--- /dev/null
+/* PR driver/78863. */
+
+/* { dg-do compile } */
+/* { dg-options "-fsanitize" } */
+/* { dg-error "unrecognized command line option .-fsanitize..$" "" { target *-*-* } 0 } */