diff mbox

[GSoC,match-and-simplify] reject for that has no pattern defined

Message ID CAJXstsCamqPPqA=GoTgLkpSzxja-m13A45_sS_wADmeMT=-tSw@mail.gmail.com
State New
Headers show

Commit Message

Prathamesh Kulkarni July 26, 2014, 8:14 p.m. UTC
Reject for that has no pattern defined.
eg - (for op in plus minus)

* genmatch.c (parse_for): Reject for that has no pattern defined.

Thanks and Regards,
Prathamesh

Comments

Richard Biener July 28, 2014, 9:53 a.m. UTC | #1
On Sat, Jul 26, 2014 at 10:14 PM, Prathamesh Kulkarn
<bilbotheelffriend@gmail.com> wrote:
> Reject for that has no pattern defined.
> eg - (for op in plus minus)
>
> * genmatch.c (parse_for): Reject for that has no pattern defined.

Thanks - commited.

Richard.

> Thanks and Regards,
> Prathamesh
diff mbox

Patch

Index: genmatch.c
===================================================================
--- genmatch.c	(revision 212928)
+++ genmatch.c	(working copy)
@@ -2059,14 +2059,18 @@  parse_for (cpp_reader *r, source_locatio
 
   vec<const char *> opers = vNULL;
 
+  const cpp_token *token;
   while (1)
     {
-      const cpp_token *token = peek (r);
+      token = peek (r); 
       if (token->type != CPP_NAME)
 	break;
       opers.safe_push (get_ident (r));
     }
 
+  if (token->type == CPP_CLOSE_PAREN)
+    fatal_at (token, "no pattern defined in for");
+
 
   while (1)
     {