aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-04-22 13:33:12 -0700
committerBen Cheng <bccheng@google.com>2014-04-22 13:33:12 -0700
commite3cc64dec20832769406aa38cde83c7dd4194bf4 (patch)
treeef8e39be37cfe0cb69d850043b7924389ff17164 /gcc-4.9/gcc/cp/name-lookup.c
parentf33c7b3122b1d7950efa88067c9a156229ba647b (diff)
downloadtoolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.tar.gz
toolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.tar.bz2
toolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.zip
[4.9] GCC 4.9.0 official release refresh
Change-Id: Ic99a7da8b44b789a48aeec93b33e93944d6e6767
Diffstat (limited to 'gcc-4.9/gcc/cp/name-lookup.c')
-rw-r--r--gcc-4.9/gcc/cp/name-lookup.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc-4.9/gcc/cp/name-lookup.c b/gcc-4.9/gcc/cp/name-lookup.c
index 53f14f3ee..0137c3f4a 100644
--- a/gcc-4.9/gcc/cp/name-lookup.c
+++ b/gcc-4.9/gcc/cp/name-lookup.c
@@ -1630,10 +1630,14 @@ leave_scope (void)
free_binding_level = scope;
}
- /* Find the innermost enclosing class scope, and reset
- CLASS_BINDING_LEVEL appropriately. */
if (scope->kind == sk_class)
{
+ /* Reset DEFINING_CLASS_P to allow for reuse of a
+ class-defining scope in a non-defining context. */
+ scope->defining_class_p = 0;
+
+ /* Find the innermost enclosing class scope, and reset
+ CLASS_BINDING_LEVEL appropriately. */
class_binding_level = NULL;
for (scope = current_binding_level; scope; scope = scope->level_chain)
if (scope->kind == sk_class)