On Wed, 2016-06-01 at 12:49 +0530, Prathamesh Kulkarni wrote:
> On 30 May 2016 at 20:45, Prasad Ghangal <[email protected]>
> wrote:
> > Hi,
> >
> > As David suggested in his rtlfe patch,
> > this patch recognizes __GIMPLE keyword and switches to
> > c_parser_parse_gimple_body by providing -fgimple option.
> >
[snip]
> >
> > +/* Parse the body of a function declaration marked with
> > "__GIMPLE". */
> > +
> > +void
> > +c_parser_parse_gimple_body (c_parser *parser)
> > +{
> > + if (!c_parser_require (parser, CPP_OPEN_BRACE, "expected
> > %<{%>"))
> > + return;
> > +
> > + location_t loc1 = c_parser_peek_token (parser)->location;
> > + inform (loc1, "start of GIMPLE");
> > +
> > + while (c_parser_next_token_is_not (parser, CPP_CLOSE_BRACE))
> Could this possibly go into infinite loop if '}' is not present in
> the source ?
Given that right now all it does is consume the input without doing
anything with it, that's hardly a problem ;) I'm sure that as Prasad
expands this function to actually parse statements that he'll handle
this case (an explicit test case for it would be appropriate).
> Thanks,
> Prathamesh
> > + {
> > + c_parser_consume_token (parser);
> > + }
> > +
> > + c_parser_consume_token (parser);
> > +}
> > +
[snip]