diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-10-29 21:47:33 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-10-29 16:47:33 -0500 |
commit | d7b3753c8ea62ea75a72457c2dd0ce73e90df6ca (patch) | |
tree | a97e66116d6440e5d248184926a1d3976dbc042f /gcc | |
parent | afcfe58c3860cc80d80c82de080afc1711d8beed (diff) | |
download | gcc-d7b3753c8ea62ea75a72457c2dd0ce73e90df6ca.zip gcc-d7b3753c8ea62ea75a72457c2dd0ce73e90df6ca.tar.gz gcc-d7b3753c8ea62ea75a72457c2dd0ce73e90df6ca.tar.bz2 |
* decl.c (lookup_name_real): OK, only warn if not lexing.
From-SVN: r23438
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d90e22d..122977e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index a263acd..ff1dc1b 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) |