From: Jason Merrill Date: Thu, 29 Oct 1998 21:47:33 +0000 (+0000) Subject: * decl.c (lookup_name_real): OK, only warn if not lexing. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d7b3753c8ea62ea75a72457c2dd0ce73e90df6ca;p=gcc.git * decl.c (lookup_name_real): OK, only warn if not lexing. From-SVN: r23438 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d90e22de019..122977e282a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 1998-10-29 Jason Merrill + * decl.c (lookup_name_real): OK, only warn if not lexing. + * cp-tree.h (IDENTIFIER_MARKED): New macro. * search.c (lookup_conversions): Use breadth_first_search. (add_conversions): Avoid adding two conversions to the same type. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index a263acd709d..ff1dc1b39f7 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5233,10 +5233,10 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only) val = locval; - /* To avoid redundant warnings, only warn when lexing, and the - decls are significantly different. */ + /* Only warn when not lexing; we don't want to warn if they + use this name as a declarator. */ subtype = TREE_TYPE (TREE_TYPE (classval)); - if (yylex + if (! yylex && ! (TREE_CODE (locval) == TEMPLATE_DECL && CLASSTYPE_TEMPLATE_INFO (subtype) && CLASSTYPE_TI_TEMPLATE (subtype) == locval)