diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2009-01-12 20:29:48 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-01-12 20:29:48 -0500 |
commit | 8e39b3681c91297e7cdf7f453518f23191582e5f (patch) | |
tree | 43d741b0aaf3a700a67b4773679f533bb02851d6 /gcc | |
parent | b9f673eb35aa687a05466b8532c25d3e56e3e1bd (diff) | |
download | gcc-8e39b3681c91297e7cdf7f453518f23191582e5f.zip gcc-8e39b3681c91297e7cdf7f453518f23191582e5f.tar.gz gcc-8e39b3681c91297e7cdf7f453518f23191582e5f.tar.bz2 |
tweak comment
From-SVN: r143321
Diffstat (limited to 'gcc')
-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 d0f85f9..6dc244fc 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; |