Commit d2f70641 by Jason Merrill Committed by Jason Merrill

re PR c++/50742 (tree check fail in check_previous_goto_1)

	PR c++/50742
	* decl.c (check_previous_goto_1): Handle using-decl.

From-SVN: r180160
parent a2e70335
2011-10-18 Jason Merrill <jason@redhat.com> 2011-10-18 Jason Merrill <jason@redhat.com>
PR c++/50742
* decl.c (check_previous_goto_1): Handle using-decl.
2011-10-18 Jason Merrill <jason@redhat.com>
PR c++/50500 PR c++/50500
DR 1082 DR 1082
* class.c (type_has_user_declared_move_constructor): New. * class.c (type_has_user_declared_move_constructor): New.
......
...@@ -2683,7 +2683,8 @@ check_previous_goto_1 (tree decl, cp_binding_level* level, tree names, ...@@ -2683,7 +2683,8 @@ check_previous_goto_1 (tree decl, cp_binding_level* level, tree names,
tree new_decls, old_decls = (b == level ? names : NULL_TREE); tree new_decls, old_decls = (b == level ? names : NULL_TREE);
for (new_decls = b->names; new_decls != old_decls; for (new_decls = b->names; new_decls != old_decls;
new_decls = DECL_CHAIN (new_decls)) new_decls = (DECL_P (new_decls) ? DECL_CHAIN (new_decls)
: TREE_CHAIN (new_decls)))
{ {
int problem = decl_jump_unsafe (new_decls); int problem = decl_jump_unsafe (new_decls);
if (! problem) if (! problem)
......
2011-10-18 Jason Merrill <jason@redhat.com> 2011-10-18 Jason Merrill <jason@redhat.com>
PR c++/50742
* g++.dg/lookup/using23.C: New.
PR c++/50500 PR c++/50500
* g++.dg/cpp0x/implicit12.C: New. * g++.dg/cpp0x/implicit12.C: New.
* g++.dg/cpp0x/defaulted20.C: Adjust. * g++.dg/cpp0x/defaulted20.C: Adjust.
......
// PR c++/50742
typedef int A;
void f(int i)
{
switch (i)
{
case 0:
using ::A;
default:;
}
}
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