Hi Marcus,

I don't seem to have the previous email in my email box, so I may give a 
redundant reply, but:

> @depends on !is_void@
> identifier r.f;
> identifier g;
> @@
> g(...)
> {<+ ...
> * f(...);
> ... +>}
> 
> 150 151
> Fatal error: exception Failure("minus: parse error:
> = File "pattern1.cocci", line 22, column 1,  charpos = 150
>    around = '<', whole content = {<+ ...
> ")
> 
> Can anything be improved for the implementation approach because of this 
> error message?

If you remove the space between "<+" and "..." your example works just fine. 
The dots are part of the nesting brackets.

Alternatively, you could write your example without the nest:

> g(...) {
>   ... when exists
> * f(...);
>   ... }

Actually, if you don't need to do anything specially about "g" why not simply 
write:
> * f(...);

Anyway, you may also want to consider cases where the result of the function is 
assigned to a variable that is unused.

Cheers,
Arie_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to