diff options
author | Jason Merrill <jason@redhat.com> | 2009-03-04 13:42:17 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-03-04 13:42:17 -0500 |
commit | 1cb801bc76b8a0fca94513bdd5d57da167b06dee (patch) | |
tree | 4b043a137dad400926339308b7bbd08a4d533f53 /gcc/cp/class.c | |
parent | f017bf5e2d08214435620cd9644a2679782cba47 (diff) | |
download | gcc-1cb801bc76b8a0fca94513bdd5d57da167b06dee.zip gcc-1cb801bc76b8a0fca94513bdd5d57da167b06dee.tar.gz gcc-1cb801bc76b8a0fca94513bdd5d57da167b06dee.tar.bz2 |
re PR c++/9634 ([DR224] Injected class name as qualifier should not make the name dependent)
PR c++/9634
PR c++/29469
PR c++/29607
* decl.c (make_typename_type): Do look inside currently open classes.
* parser.c (cp_parser_lookup_name): Likewise.
(cp_parser_template_name): Likewise.
* pt.c (dependent_scope_p): New function.
* cp-tree.h: Declare it.
* class.c (currently_open_class): Return fast if T isn't a class.
Co-Authored-By: Giovanni Bajo <giovannibajo@gcc.gnu.org>
From-SVN: r144618
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 13fa990..ae89218 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5787,6 +5787,9 @@ currently_open_class (tree t) { int i; + if (!CLASS_TYPE_P (t)) + return false; + /* We start looking from 1 because entry 0 is from global scope, and has no type. */ for (i = current_class_depth; i > 0; --i) |