diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-10-29 21:54:57 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-10-29 16:54:57 -0500 |
commit | 24c659840f258e93a4ca245641c99e15b3dc6150 (patch) | |
tree | b673e7d712ae0264d83e50e4f7674729d4c60e3c /gcc | |
parent | d7b3753c8ea62ea75a72457c2dd0ce73e90df6ca (diff) | |
download | gcc-24c659840f258e93a4ca245641c99e15b3dc6150.zip gcc-24c659840f258e93a4ca245641c99e15b3dc6150.tar.gz gcc-24c659840f258e93a4ca245641c99e15b3dc6150.tar.bz2 |
* decl.c (lookup_name_real): Simplify suggested fix.
From-SVN: r23439
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 1 | ||||
-rw-r--r-- | gcc/cp/decl.c | 14 |
2 files changed, 5 insertions, 10 deletions
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 <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. 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); } } } |