diff options
author | Jason Merrill <jason@redhat.com> | 2009-09-08 14:13:02 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-09-08 14:13:02 -0400 |
commit | 3e5e84be5a2a8ecb0dc9db24593d4d586140cbec (patch) | |
tree | 20bf711ccabe80288b34be1ae5a9afbac7eda308 | |
parent | ee18fe39d375b10f99c0d5b428da50157fbbce83 (diff) | |
download | gcc-3e5e84be5a2a8ecb0dc9db24593d4d586140cbec.zip gcc-3e5e84be5a2a8ecb0dc9db24593d4d586140cbec.tar.gz gcc-3e5e84be5a2a8ecb0dc9db24593d4d586140cbec.tar.bz2 |
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
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/class.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ebf4518..4244976 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 2c308cf..9938a3d 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -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) |