From dd36b8775fb8c66165f1ad9780102f26768bcd8f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 14 Jul 2016 20:34:00 +0200 Subject: re PR c/71858 (Surprising suggestions for misspellings) PR c/71858 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible. * gcc.dg/spellcheck-identifiers.c (snprintf): Declare. * gcc.dg/spellcheck-identifiers-2.c: New test. * gcc.dg/diagnostic-token-ranges.c (nanl): Declare. * c-c++-common/attributes-1.c: Adjust dg-prune-output. From-SVN: r238352 --- gcc/c/c-decl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/c/c-decl.c') diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index c173796..e2e0f64 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -4021,7 +4021,7 @@ lookup_name_fuzzy (tree name, enum lookup_name_fuzzy_kind kind) for (c_scope *scope = current_scope; scope; scope = scope->outer) for (c_binding *binding = scope->bindings; binding; binding = binding->prev) { - if (!binding->id) + if (!binding->id || binding->invisible) continue; /* Don't use bindings from implicitly declared functions, as they were likely misspellings themselves. */ -- cgit v1.1