[Cocci] Problem when using a macro for mangling function names

Julia Lawall julia at diku.dk
Thu Mar 19 23:03:53 CET 2009


It does seem to be a bug, derived from incorrect parsing of the C code.  
Unfortunately, Yoann, who knows most about the parser, is probably not 
able to look into it right now.

Do you have a lot of macros like this?  If this is the only one, you can 
add the following to your standard.h file:

#define METH(x) x

Note that the standard.h file that you use is in /usr/local/share.  On the 
other hand, since you are not working on Linux code, the definitions in 
that file are perhaps not of much interest to you.  You can thus also put 
this #define in a local file and include it using the -macro_file option 
to spatch, at least for initial testing.

julia


More information about the Cocci mailing list