diff options
author | Jason Merrill <jason@redhat.com> | 2009-09-21 12:11:19 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-09-21 12:11:19 -0400 |
commit | c67a1c461a7e39b564e4717032c526915bd1dfb8 (patch) | |
tree | fcd7c1155ac6b92fbd524f1afac5e1b82b526168 /gcc | |
parent | 4b51caf2da7937a038f058455e6d287d44f519f7 (diff) | |
download | gcc-c67a1c461a7e39b564e4717032c526915bd1dfb8.zip gcc-c67a1c461a7e39b564e4717032c526915bd1dfb8.tar.gz gcc-c67a1c461a7e39b564e4717032c526915bd1dfb8.tar.bz2 |
* name-lookup.c (push_class_level_binding): Sanity check.
From-SVN: r151931
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6c2ce9c..7629515 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2009-09-21 Jason Merrill <jason@redhat.com> + + * name-lookup.c (push_class_level_binding): Sanity check. + 2009-09-18 Jason Merrill <jason@redhat.com> * decl2.c (determine_visibility): Make anonymous types internal. diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 4928506..d37cf44 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -2751,6 +2751,9 @@ push_class_level_binding (tree name, tree x) /* Check for invalid member names. */ gcc_assert (TYPE_BEING_DEFINED (current_class_type)); + /* Check that we're pushing into the right binding level. */ + gcc_assert (current_class_type == class_binding_level->this_entity); + /* We could have been passed a tree list if this is an ambiguous declaration. If so, pull the declaration out because check_template_shadow will not handle a TREE_LIST. */ |