On Fri, 2 Jan 2015, Christof Warlich wrote:
> > 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.
Shouldn't the static also be in the definition?
julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci