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
This commit is contained in:
Jason Merrill 2009-09-08 14:13:02 -04:00 committed by Jason Merrill
parent ee18fe39d3
commit 3e5e84be5a
2 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,8 @@
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.
* method.c (lazily_declare_fn): Check for dtorness in ABI warning.

View File

@ -5846,6 +5846,8 @@ currently_open_class (tree t)
if (!CLASS_TYPE_P (t))
return false;
t = TYPE_MAIN_VARIANT (t);
/* We start looking from 1 because entry 0 is from global scope,
and has no type. */
for (i = current_class_depth; i > 0; --i)