Committed as obvious.

Richard.

2016-10-05  Richard Biener  <rguent...@suse.de>

        PR middle-end/77842
        * genmatch.c (parser::parse_c_expr): Handle premature EOF.

Index: gcc/genmatch.c
===================================================================
--- gcc/genmatch.c      (revision 240770)
+++ gcc/genmatch.c      (working copy)
@@ -4124,6 +4152,8 @@ parser::parse_c_expr (cpp_ttype start)
       else if (token->type == end
               && --opencnt == 0)
        break;
+      else if (token->type == CPP_EOF)
+       fatal_at (token, "unexpected end of file");
 
       /* This is a lame way of counting the number of statements.  */
       if (token->type == CPP_SEMICOLON)

Reply via email to