From 24c659840f258e93a4ca245641c99e15b3dc6150 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 29 Oct 1998 21:54:57 +0000 Subject: * decl.c (lookup_name_real): Simplify suggested fix. From-SVN: r23439 --- gcc/cp/ChangeLog | 1 + gcc/cp/decl.c | 14 ++++---------- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 122977e..bd3c0f1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,6 +1,7 @@ 1998-10-29 Jason Merrill * 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. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index ff1dc1b..6e0a409 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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); } } } -- cgit v1.1