All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] Matching function pointer typedef
@ 2018-05-15 20:36 Jerome Glisse
  2018-05-15 20:50 ` Håkon Løvdal
  2018-05-17 19:28 ` Julia Lawall
  0 siblings, 2 replies; 10+ messages in thread
From: Jerome Glisse @ 2018-05-15 20:36 UTC (permalink / raw)
  To: cocci

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);

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;

also fails to work. But if typedef is use with struct then it works.
For instance:

@@
@@
- typedef struct {int a;} nombre;
+ typedef struct {unsigned a;} nombre;

Do work. Looking at declaration grammar i do not see why the former
does not work. I am using fedora 27 coccinelle 1.0.6 if that matters.

Is this a known limitation or am i writting it wrong ?

Thank you for any input on this,
J?r?me

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-05-18 17:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15 20:36 [Cocci] Matching function pointer typedef Jerome Glisse
2018-05-15 20:50 ` Håkon Løvdal
2018-05-15 20:53   ` Julia Lawall
2018-05-15 21:26     ` Jerome Glisse
2018-05-16 15:13       ` Jerome Glisse
2018-05-16 18:35         ` Julia Lawall
2018-05-17 19:28 ` Julia Lawall
2018-05-17 19:48   ` Jerome Glisse
     [not found]   ` <51d95102-78ad-b56b-c470-c83d3f6c6b9b@users.sourceforge.net>
2018-05-18 16:53     ` Julia Lawall
     [not found]       ` <c3c0b202-ad2c-b53e-f73c-acc2baba9279@users.sourceforge.net>
2018-05-18 17:54         ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.