* decl.c (lookup_name_real): OK, only warn if not lexing.
authorJason Merrill <jason@yorick.cygnus.com>
Thu, 29 Oct 1998 21:47:33 +0000 (21:47 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 29 Oct 1998 21:47:33 +0000 (16:47 -0500)
From-SVN: r23438

gcc/cp/ChangeLog
gcc/cp/decl.c

index d90e22de01964db077c65357f5b53001269f64e8..122977e282a4a0e4efb2a8d99e60fe21b24268df 100644 (file)
@@ -1,5 +1,7 @@
 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
 
+       * 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.
index a263acd709dd65fee61b90f7490198fcbcfb963b..ff1dc1b39f7fb36ded0f16aad224b24a9f505afe 100644 (file)
@@ -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)