On Tue, Oct 28, 2014 at 1:26 PM, Prathamesh Kulkarni
<bilbotheelffri...@gmail.com> wrote:
> On Tue, Oct 28, 2014 at 3:50 PM, Richard Biener
> <richard.guent...@gmail.com> wrote:
>> On Mon, Oct 27, 2014 at 3:32 PM, Prathamesh Kulkarni
>> <bilbotheelffri...@gmail.com> wrote:
>>> I suppose we should reject conditional convert and commutative ops in
>>> result operand ? since it would create 1-n mapping from match ->
>>> result.
>>
>> Yeah.  Same is true for parsing of :type syntax for the match part.
>> Now that we have a class parser I think it would be better to simply
>> record whether we are parsing ->match or ->result and issue the
>> diagnostic at parsing time.
>>
>> Can you adjust the patch accordingly?
> Is the following version okay ?

Yes, applied.

Thanks,
Richard.

> * genmatch.c
>   (parser): Add new member parsing_match_operand.
>   (parser::parse_operation): Check for conditional convert in result operand.
>   (parser::parse_expr): Check for commutative operator in result operand.
>                                      Check for :type in match operand.
>   (parser::parse_simplify): Set/unset parsing_match_operand.
>
> Thanks,
> Prathamesh
>
>>
>> Thanks,
>> Richard.
>>
>>> * genmatch.c
>>>   (fatal_at): New overloaded function with source_location as first 
>>> parameter.
>>>   (has_opt_convert_or_commutative_ops): New function.
>>>   (lower): Call has_opt_convert_or_commutative_ops.
>>>
>>> Thanks,
>>> Prathamesh

Reply via email to