On Thu, May 17, 2018 at 09:28:00PM +0200, Julia Lawall wrote:
> 
> 
> On Tue, 15 May 2018, Jerome Glisse wrote:
> 
> > Hello,
> >
> > I am trying to modify an function pointer typedef something like:
> >
> > @@
> > @@
> > - typedef void (*toto_t)(int a, int b);
> > + typedef void (*toto_t)(int a, int b, int c);
> 
> This now works.  Currently, you need to remove the whole typedef and add
> it back, not just add the third argument as Håkon suggested.

Awesome ! :) Thank you for working on that.

> 
> >
> > But it seems spatch or the semantic does not handle function pointer.
> > Or simply that typedef is not well handled in the first place. Thing
> > like:
> >
> > @@
> > @@
> > - typedef int nombre;
> > + typedef unsigned nombre;
> 
> Was this just an experiment, or is it something you need?  I would imagine
> that the problem is that "unsigned" as a type by itself is not well
> supported.

This was just an experiment i did while trying to understand why my
function pointer typedef changes did not work. If i use long or any
basic ctype then it works.

Cheers,
Jérôme
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to