aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-07-14 20:34:00 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-07-14 20:34:00 +0200
commitdd36b8775fb8c66165f1ad9780102f26768bcd8f (patch)
tree85fbbad9c2e8ae4759111b9cdd60fa5bf8d9063d /gcc/c
parenta241f8ca212b7f27a986e495c15d6890d0dbb44e (diff)
downloadgcc-dd36b8775fb8c66165f1ad9780102f26768bcd8f.zip
gcc-dd36b8775fb8c66165f1ad9780102f26768bcd8f.tar.gz
gcc-dd36b8775fb8c66165f1ad9780102f26768bcd8f.tar.bz2
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
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog5
-rw-r--r--gcc/c/c-decl.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 96dbf6b..6d35693 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,8 @@
+2016-07-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/71858
+ * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
+
2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* c-parser.c (c_parser_generic_selection): Make type of variable
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. */