This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [genmatch] reject empty c_expr
- From: Richard Biener <rguenther at suse dot de>
- To: Prathamesh Kulkarni <prathamesh dot kulkarni at linaro dot org>
- Cc: gcc Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 16 Jul 2015 09:09:02 +0200 (CEST)
- Subject: Re: [genmatch] reject empty c_expr
- Authentication-results: sourceware.org; auth=none
- References: <CAAgBjMnin_uqmwnku+UW48DTCTEZ=5CTDxXXffYGCyW_0n6Jiw at mail dot gmail dot com>
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)