From: christof@warlich.name (Christof Warlich)
To: cocci@systeme.lip6.fr
Subject: [Cocci] adding function declarations
Date: Fri, 02 Jan 2015 00:50:09 +0100 [thread overview]
Message-ID: <54A5DD31.80408@warlich.name> (raw)
In-Reply-To: <alpine.DEB.2.02.1501012052080.2038@localhost6.localdomain6>
> Now I'm not sure what is wanted to be done.
Sorry if my last mail caused confusion: I just thought I may simplify
things by suggesting to avoid expanding the "inline" macro for
generating the semantic patch at all: Without "inline" being defined as
a macro, Coccinelle would no see any attributes at all, so that the
complete task of the semantic patch boils down to converting
static inline <someType> <someFunctionName>(<someParameterList>) {
<someCode>
}
to
static inline <someType> <someFunctionName>(<someParameterList>);
<someType> <someFunctionName>(<someParameterList>) {
<someCode>
}
Then, after creating and applying the semantic patch that does the
conversion described above, the linux build process would do its macro
magic as usual, causing the preprocessor to do its work, e.g. replacing
"inline" by "inline __attribute__((always_inline))
__attribute__((no_instrument_function))". Doing so would make g++ happy
as well, as the attributes are now only present in the function's
declaration instead of the functions definition.
next prev parent reply other threads:[~2015-01-01 23:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-01 14:43 [Cocci] adding function declarations Christof Warlich
2015-01-01 16:02 ` Julia Lawall
2015-01-01 19:06 ` Christof Warlich
2015-01-01 19:54 ` Julia Lawall
2015-01-01 23:50 ` Christof Warlich [this message]
2015-01-02 6:05 ` Julia Lawall
2015-01-02 8:23 ` Christof Warlich
2015-01-01 17:33 ` Julia Lawall
2015-01-02 10:22 ` Christof Warlich
2015-01-02 10:30 ` Julia Lawall
2015-01-02 11:11 ` Christof Warlich
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=54A5DD31.80408@warlich.name \
--to=christof@warlich.name \
--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.