diff options
| author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-13 01:29:48 +0000 |
|---|---|---|
| committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-13 01:29:48 +0000 |
| commit | f0f118bddcd877a337b1a70823d2785318530f2a (patch) | |
| tree | 43d741b0aaf3a700a67b4773679f533bb02851d6 | |
| parent | f9769e4a59804ecd387fe04180dfee9dbf778cc5 (diff) | |
| download | ppe42-gcc-f0f118bddcd877a337b1a70823d2785318530f2a.tar.gz ppe42-gcc-f0f118bddcd877a337b1a70823d2785318530f2a.zip | |
tweak comment
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143321 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/name-lookup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index d0f85f99061..6dc244fccb8 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -4043,8 +4043,12 @@ outer_binding (tree name, return class_binding; } } - /* If SCOPE is a template and if NAME binds to one of its template parameters - return the binding, otherwise we might miss it. */ + /* If we are in a member template, the template parms of the member + template are considered to be inside the scope of the containing + class, but within G++ the class bindings are all pushed between the + template parms and the function body. So if the outer binding is + a template parm for the current scope, return it now rather than + look for a class binding. */ if (outer_scope && outer_scope->kind == sk_template_parms && binding_to_template_parms_of_scope_p (outer, scope)) return outer; |

