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

From-SVN: r23439
This commit is contained in:
Jason Merrill 1998-10-29 21:54:57 +00:00 committed by Jason Merrill
parent d7b3753c8e
commit 24c659840f
2 changed files with 5 additions and 10 deletions

View File

@ -1,6 +1,7 @@
1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (lookup_name_real): OK, only warn if not lexing.
Simplify suggested fix.
* cp-tree.h (IDENTIFIER_MARKED): New macro.
* search.c (lookup_conversions): Use breadth_first_search.

View File

@ -5243,17 +5243,11 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only)
&& ! (TREE_CODE (locval) == TYPE_DECL
&& comptypes (TREE_TYPE (locval), subtype, 1)))
{
static int explained;
cp_warning ("lookup of `%D' finds `%#D'", name, locval);
cp_warning
(" instead of `%D' from dependent base class", classval);
if (! explained)
{
explained = 1;
cp_warning (" (use `typename %D' if that's what you meant)",
classval);
}
cp_warning (" instead of `%D' from dependent base class",
classval);
cp_warning (" (use `typename %T::%D' if that's what you meant)",
constructor_name (current_class_type), name);
}
}
}