diff options
author | Mark Mitchell <mark@codesourcery.com> | 2002-10-14 21:09:25 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2002-10-14 21:09:25 +0000 |
commit | 77631fa7edc6a2b6c4177c0f7a3b1eb454e372c3 (patch) | |
tree | 7142d32b87fe2af1def71461c8e942143c3586f4 /gcc/cp | |
parent | f5204e6cb8ccfb786d254836ca4c06d3787b6c59 (diff) | |
download | gcc-77631fa7edc6a2b6c4177c0f7a3b1eb454e372c3.zip gcc-77631fa7edc6a2b6c4177c0f7a3b1eb454e372c3.tar.gz gcc-77631fa7edc6a2b6c4177c0f7a3b1eb454e372c3.tar.bz2 |
re PR c++/7176 (g++ confused by friend and static member with same name)
PR c++/7176
* g++.dg/parse/friend1.C: New test.
* g++.old-deja/g++.pt/memtemp64.C: Adjust.
PR c++/7176
* lex.c (do_identifier): Add another option for the parsing
parameter.
* parse.y (do_id): Use it.
From-SVN: r58135
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/lex.c | 4 | ||||
-rw-r--r-- | gcc/cp/parse.y | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5704c90..e5c7356 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2002-10-14 Mark Mitchell <mark@codesourcery.com> + + PR c++/7176 + * lex.c (do_identifier): Add another option for the parsing + parameter. + * parse.y (do_id): Use it. + 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net> PRs C++/6803, C++/7721 and C++/7803 diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 2342c23..bab2988 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -1135,7 +1135,7 @@ do_identifier (token, parsing, args) tree args; { register tree id; - int lexing = (parsing == 1); + int lexing = (parsing == 1 || parsing == 3); if (! lexing) id = lookup_name (token, 0); @@ -1157,7 +1157,7 @@ do_identifier (token, parsing, args) /* Remember that this name has been used in the class definition, as per [class.scope0] */ - if (id && parsing) + if (id && parsing && parsing != 3) maybe_note_name_used_in_class (token, id); if (id == error_mark_node) diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index 104c4a7..78cf991 100644 --- a/gcc/cp/parse.y +++ b/gcc/cp/parse.y @@ -1516,7 +1516,7 @@ do_id: do_identifier; we only do that for unqualified identifiers. */ if (!lastiddecl || !BASELINK_P (lastiddecl)) - $$ = do_identifier ($<ttype>-1, 1, NULL_TREE); + $$ = do_identifier ($<ttype>-1, 3, NULL_TREE); else $$ = $<ttype>-1; } |