On Mon, 18 Aug 2014, Lars-Peter Clausen wrote:

> On 08/18/2014 11:49 AM, Julia Lawall wrote:
> > Actually, isn't the whoe structure field the wrong way to go about it
> > here?  Don't we just want a pointer-typed expression, of whatever form it
> > has?  That will unfortunately require lots of type information, but I
> > don't see how to do it otherewise, because any kind of variable or
> > structure field reference can also be an integer.  There isno reason why
> > eg the structure field reference is the array.
> >
> > expression *e; matches a pointer.
>
> The problem is that (foo->bar + 10) with foo->bar being a pointer is still a
> expression of the pointer type and so e will match the whole expression rather
> than just matching foo->bar.

OK, that's true.

How about then

(
e1 .@e2 f + x
|
e1 ->@e2 f + x
)

where e2 has pointer typw (or array type?)

e2 on the . or -> will pick up the entire innermost enclosing expression.

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

Reply via email to