> I wanted to kick myself for not using a single rule for bad1 and bad2
> @ bad @
> identifier IWineD3D ~= "^IWineD3D.*";
> position p != good.p;
> expression E;
> @@
> + wined3d_mutex_lock();
> (
>   iwine...@p( ... );
> |
>   E = iwine...@p( ... );
> )
> + wined3d_mutex_unlock();
> 
> but that gives an error too:
> Fatal error: exception Failure("14: no available token to attach to")
> While I can understand why <... iwine...@p( ... ) ...> would give that error I
> don't see what is ambiguous about this rule.

It doesn't distribute + over ( | ).  In this case, it could be made to 
work, but other cases seemed much more complicated, so we decided to 
disallow it completely.  Just duplicate the + code inside the ( | ) 
branches.

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

Reply via email to