On Sun, 17 Aug 2014, Joe Perches wrote:

> On Sun, 2014-08-17 at 18:09 +0200, SF Markus Elfring wrote:
> > > I would prefer to be able to convert
> > >   *(skb->data + frame_size / 2 + 10)
> > > not to
> > >   (skb->data + frame_size / 2)[10]
> > > but to
> > >   skb->data[frame_size / 2 + 10]
> > >
> > > but I don't know how.
> >
> > How do you think about a bit more fine-tuning for the desired semantic
> > patch?
>
> Not sure I understand what you are requesting.
>
> > Can it be that the pattern "*(foo + e)" is too generic for any source
> > code place?
>
> I don't think so as any type or combination of
> arithmetic operations would then need to be specified
> by the spatch input script.
>
> > Would you like to try out the specification of a few more elements
> > instead of a single expression here?
>
> Not really.
>
> I think a precedence specification capability like first
> pointer match followed by longest arithmetic match would
> perhaps be a better generic facility.

Isn't the problem already solved? If not, I will look into it.

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to