]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Make issues similar to PR c++/68948 fail loudly.
authorJason Merrill <jason@redhat.com>
Fri, 5 Feb 2016 17:52:07 +0000 (12:52 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 5 Feb 2016 17:52:07 +0000 (12:52 -0500)
* semantics.c (finish_expr_stmt): If expr is error_mark_node,
make sure we've seen_error().

From-SVN: r233183

gcc/cp/ChangeLog
gcc/cp/semantics.c

index 74e7cb17c0c7a53fdaf88f0136f645902ee563ab..a7f2b34e4250268cd6a1e3f9d6ebc5106c7295f9 100644 (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
index 95c4f19f84a1c1d3a692084415d6ebffdf81c37a..c9f9db4d4108063cef461d1fc9c30267b5817598 100644 (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)