diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-03 17:59:58 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-03 17:59:58 +0000 |
commit | 29ac02b715604512e11e68d1c722433b98e60837 (patch) | |
tree | 64c2d418be47ee0413e8586849d3a385799239e5 /gcc/cp/semantics.c | |
parent | 7b7cb32646bb29730e6598a5aff5eda24de7a561 (diff) | |
download | gcc-29ac02b715604512e11e68d1c722433b98e60837.tar.gz |
PR c++/14002
* semantics.c (finish_id_expression): Do not return an
IDENTIFIER_NODE when lookup finds a PARM_DECL.
PR c++/14002
* g++.dg/parse/template13.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77183 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 5b1b1ef4d1c..511c7bc9348 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2527,7 +2527,8 @@ finish_id_expression (tree id_expression, /* If we found a variable, then name lookup during the instantiation will always resolve to the same VAR_DECL (or an instantiation thereof). */ - if (TREE_CODE (decl) == VAR_DECL) + if (TREE_CODE (decl) == VAR_DECL + || TREE_CODE (decl) == PARM_DECL) return decl; return id_expression; } |