On Tue, May 15, 2018 at 10:53:36PM +0200, Julia Lawall wrote:
> 
> 
> On Tue, 15 May 2018, Håkon Løvdal wrote:
> 
> > It's been a while since I used coccinelle, but I think to remember that you 
> > must
> > (and in any case should) keep the non-changing parts outside of the
> > +/- lines, e.g.
> >
> > @@
> > @@
> >          typedef void (*toto_t)(int a, int b
> > +        , int c
> >          );
> 
> I think that typedefs of function pointers just don't work.  It is looking
> for typedef type name;.  I can try to fix this.
> 

Above does not work either. The error is same roughly spatch complains
that it matches whole content ... I have a workaround, namely abusing
gcc which accept:

typedef void toto_t(int a, int b);

For function pointer typedef and then coccinelle on function declaration
do work. Still it would be nice if coccinelle can understand function
pointer typedef.

Jérôme
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to