This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [genmatch] reject empty c_expr


On Wed, 15 Jul 2015, Prathamesh Kulkarni wrote:

> Hi,
> We allow c_expr to be empty which accepts cases like the following:
> 
> (simplify
>   match-operand
>   (if ()
>     result-operand))
> 
> (simplify
>   match-operand
>   {})

Yes we do.  We also do not reject various other "bad" forms like

 { ( blah! }

so I am not sure treating empty ones specially makes sense.  After
all a c-expr is just a list of preprocessing tokens we re-inject
into the generated C code.

> The attached patch rejects empty c_expr.
> Ok for trunk after bootstrap + test ?
> 
> Thank you,
> Prathamesh
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nuernberg)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]