aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-05-24 16:26:47 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-05-24 16:26:47 -0400
commit235fe6b4497f0d110914461420ab3c91240988d8 (patch)
tree9f67e894c2b9a4561659d96cfd45d31db665c22f /gcc/cp/name-lookup.c
parent78be79d534fbcf2799c2c4e0b2c768134c9990d4 (diff)
downloadgcc-235fe6b4497f0d110914461420ab3c91240988d8.zip
gcc-235fe6b4497f0d110914461420ab3c91240988d8.tar.gz
gcc-235fe6b4497f0d110914461420ab3c91240988d8.tar.bz2
re PR c++/48884 (decltype's operand doesn't consider friend declaration)
PR c++/48884 * class.c (pushclass): Accept NULL argument. (popclass): Deal with popping null class. * pt.c (push_access_scope, pop_access_scope): Use them rather than push_to_top_level/pop_from_top_level. (push_deduction_access_scope, pop_defarg_context): New. (fn_type_unification): Use them. * name-lookup.c (lookup_name_real_1): Check current_class_type. From-SVN: r174139
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r--gcc/cp/name-lookup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 3d1c64d..bb6d4b9 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -4469,7 +4469,7 @@ lookup_name_real_1 (tree name, int prefer_type, int nonclass, bool block_p,
/* Conversion operators are handled specially because ordinary
unqualified name lookup will not find template conversion
operators. */
- if (IDENTIFIER_TYPENAME_P (name))
+ if (IDENTIFIER_TYPENAME_P (name) && current_class_type)
{
struct cp_binding_level *level;