Make issues similar to PR c++/68948 fail loudly.

* semantics.c (finish_expr_stmt): If expr is error_mark_node,
	make sure we've seen_error().

From-SVN: r233183
This commit is contained in:
Jason Merrill 2016-02-05 12:52:07 -05:00 committed by Jason Merrill
parent f7dfa966ee
commit 0fd9d4921f
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2016-02-05 Jason Merrill <jason@redhat.com>
PR c++/68948
* semantics.c (finish_expr_stmt): If expr is error_mark_node,
make sure we've seen_error().
2016-02-05 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/68948

View File

@ -673,6 +673,9 @@ finish_expr_stmt (tree expr)
if (expr != NULL_TREE)
{
/* If we ran into a problem, make sure we complained. */
gcc_assert (expr != error_mark_node || seen_error ());
if (!processing_template_decl)
{
if (warn_sequence_point)