This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
C++ PATCH to tweak lookup_name_real pedwarn
- To: gcc-patches at gcc dot gnu dot org
- Subject: C++ PATCH to tweak lookup_name_real pedwarn
- From: Jason Merrill <jason at redhat dot com>
- Date: 08 Feb 2001 15:43:38 +0000
While looking at another issue, I noticed that this error wasn't very
helpful; it often would simply indicate that, say, T looked up in some
scope referred to `T'.
This doesn't really fix any bugs, but seems safe enough to go in anyway.
2001-02-08 Jason Merrill <jason@redhat.com>
* decl.c (lookup_name_real): Tweak warning to refer to decls, not
types.
*** decl.c.~1~ Thu Feb 8 12:43:03 2001
--- decl.c Thu Feb 8 12:43:05 2001
*************** lookup_name_real (name, prefer_type, non
*** 5993,6002 ****
&& TREE_CODE (val) == TYPE_DECL
&& ! same_type_p (TREE_TYPE (from_obj), TREE_TYPE (val)))
cp_pedwarn ("\
! lookup of `%D' in the scope of `%#T' (`%#T') \
! does not match lookup in the current scope (`%#T')",
! name, got_object, TREE_TYPE (from_obj),
! TREE_TYPE (val));
/* We don't change val to from_obj if got_object depends on
template parms because that breaks implicit typename for
--- 6011,6019 ----
&& TREE_CODE (val) == TYPE_DECL
&& ! same_type_p (TREE_TYPE (from_obj), TREE_TYPE (val)))
cp_pedwarn ("\
! lookup of `%D' in the scope of `%#T' (`%#D') \
! does not match lookup in the current scope (`%#D')",
! name, got_object, from_obj, val);
/* We don't change val to from_obj if got_object depends on
template parms because that breaks implicit typename for