diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-12-22 20:52:55 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-12-22 20:52:55 +0000 |
commit | 1ffe6573a9fc8c9de27d6372cd506533599fc55e (patch) | |
tree | 2b4a607757aed1c1da46baad13def1adc74f330f /gcc/cp | |
parent | a6444561cb21197a38277a144672cace471b6cf6 (diff) | |
download | gcc-1ffe6573a9fc8c9de27d6372cd506533599fc55e.zip gcc-1ffe6573a9fc8c9de27d6372cd506533599fc55e.tar.gz gcc-1ffe6573a9fc8c9de27d6372cd506533599fc55e.tar.bz2 |
re PR c++/12397 (two-stage name lookup argument shadowed by global type)
PR c++/12397
* typeck.c (finish_class_member_access_expr): Don't tree
IDENTIFIER_NODEs as non-dependent expressions.
PR c++/12397
* g++.dg/template/lookup3.C: New test.
From-SVN: r74949
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index defadd5..4e4864fd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2003-12-22 Mark Mitchell <mark@codesourcery.com> + + PR c++/12397 + * typeck.c (finish_class_member_access_expr): Don't tree + IDENTIFIER_NODEs as non-dependent expressions. + 2003-12-22 Andrew Pinski <pinskia@physics.uc.edu> PR c++/5050 diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index b76d536..3cdfdc2 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -1809,6 +1809,9 @@ finish_class_member_access_expr (tree object, tree name) { if (/* If OBJECT_TYPE is dependent, so is OBJECT.NAME. */ dependent_type_p (object_type) + /* If NAME is just an IDENTIFIER_NODE, then the expression + is dependent. */ + || TREE_CODE (object) == IDENTIFIER_NODE /* If NAME is "f<args>", where either 'f' or 'args' is dependent, then the expression is dependent. */ || (TREE_CODE (name) == TEMPLATE_ID_EXPR |