From: jglisse@redhat.com (Jerome Glisse)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Matching function pointer typedef
Date: Tue, 15 May 2018 16:36:07 -0400 [thread overview]
Message-ID: <20180515203606.GA3687@redhat.com> (raw)
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
next reply other threads:[~2018-05-15 20:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 20:36 Jerome Glisse [this message]
2018-05-15 20:50 ` [Cocci] Matching function pointer typedef 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180515203606.GA3687@redhat.com \
--to=jglisse@redhat.com \
--cc=cocci@systeme.lip6.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.