Commit 0806181f by Paolo Carlini Committed by Paolo Carlini

decl.c (check_previous_goto_1): When decl_jump_unsafe returns 2 emit an error…

decl.c (check_previous_goto_1): When decl_jump_unsafe returns 2 emit an error instead of a permerror.

/cp
2018-08-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (check_previous_goto_1): When decl_jump_unsafe returns 2
	emit an error instead of a permerror.

/testsuite
2018-08-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/init/goto3.C: Adjust for error instead of permerror.

From-SVN: r263551
parent 68d23593
2018-08-15 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (check_previous_goto_1): When decl_jump_unsafe returns 2
emit an error instead of a permerror.
2018-08-13 Marek Polacek <polacek@redhat.com>
PR c++/57891
......
......@@ -3191,7 +3191,8 @@ check_previous_goto_1 (tree decl, cp_binding_level* level, tree names,
if (!identified)
{
complained = identify_goto (decl, input_location, locus,
DK_PERMERROR);
problem > 1
? DK_ERROR : DK_PERMERROR);
identified = 1;
}
if (complained)
......
2018-08-15 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/init/goto3.C: Adjust for error instead of permerror.
2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
* gcc.target/i386/sse2-movs.c: New test.
......
......@@ -15,11 +15,11 @@ adapt_parameters_next_iteration(void)
case VAR_NONE: break;
case VAR_DELTA:
int trunc_n_ants = 0;
int trunc_n_ants = 0; // { dg-message "initialization" }
n_ants += trunc_n_ants;
break;
case VAR_SWITCH:
case VAR_SWITCH: // { dg-error "jump" }
break;
default: break;
default: break; // { dg-error "jump" }
}
}
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