From: jglisse@redhat.com (Jerome Glisse)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Matching function pointer typedef
Date: Tue, 15 May 2018 17:26:59 -0400 [thread overview]
Message-ID: <20180515212659.GB3687@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1805152252500.2532@hadrien>
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
next prev parent reply other threads:[~2018-05-15 21:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=20180515212659.GB3687@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.