Commit 3e5e84be by Jason Merrill Committed by Jason Merrill

class.c (currently_open_class): Make sure we're dealing with the main variant.

	* class.c (currently_open_class): Make sure we're dealing with the
	main variant.

From-SVN: r151529
parent ee18fe39
2009-09-03 Jason Merrill <jason@redhat.com> 2009-09-03 Jason Merrill <jason@redhat.com>
* class.c (currently_open_class): Make sure we're dealing with the
main variant.
* cp-tree.h (enum overload_flags): Remove OP_FLAG. * cp-tree.h (enum overload_flags): Remove OP_FLAG.
* method.c (lazily_declare_fn): Check for dtorness in ABI warning. * method.c (lazily_declare_fn): Check for dtorness in ABI warning.
......
...@@ -5846,6 +5846,8 @@ currently_open_class (tree t) ...@@ -5846,6 +5846,8 @@ currently_open_class (tree t)
if (!CLASS_TYPE_P (t)) if (!CLASS_TYPE_P (t))
return false; return false;
t = TYPE_MAIN_VARIANT (t);
/* We start looking from 1 because entry 0 is from global scope, /* We start looking from 1 because entry 0 is from global scope,
and has no type. */ and has no type. */
for (i = current_class_depth; i > 0; --i) for (i = current_class_depth; i > 0; --i)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment