Commit 24c65984 by Jason Merrill Committed by Jason Merrill

* decl.c (lookup_name_real): Simplify suggested fix.

From-SVN: r23439
parent d7b3753c
1998-10-29 Jason Merrill <jason@yorick.cygnus.com> 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (lookup_name_real): OK, only warn if not lexing. * decl.c (lookup_name_real): OK, only warn if not lexing.
Simplify suggested fix.
* cp-tree.h (IDENTIFIER_MARKED): New macro. * cp-tree.h (IDENTIFIER_MARKED): New macro.
* search.c (lookup_conversions): Use breadth_first_search. * search.c (lookup_conversions): Use breadth_first_search.
......
...@@ -5243,17 +5243,11 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only) ...@@ -5243,17 +5243,11 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only)
&& ! (TREE_CODE (locval) == TYPE_DECL && ! (TREE_CODE (locval) == TYPE_DECL
&& comptypes (TREE_TYPE (locval), subtype, 1))) && comptypes (TREE_TYPE (locval), subtype, 1)))
{ {
static int explained;
cp_warning ("lookup of `%D' finds `%#D'", name, locval); cp_warning ("lookup of `%D' finds `%#D'", name, locval);
cp_warning cp_warning (" instead of `%D' from dependent base class",
(" instead of `%D' from dependent base class", classval); classval);
if (! explained) cp_warning (" (use `typename %T::%D' if that's what you meant)",
{ constructor_name (current_class_type), name);
explained = 1;
cp_warning (" (use `typename %D' if that's what you meant)",
classval);
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment