SV: [Cocci] Macro parsing without ;
julia at diku.dk
Mon Nov 30 10:01:52 CET 2009
On Mon, 30 Nov 2009, Andreas.Aaen at tieto.com wrote:
> With the example below. If I put:
> #define HEADER(head) int head ;
> I a macro.h file, then it works if I do:
> spatch -macro_file_buildins macro.h -parse_c test/testhead.c
> but not if I do a:
> spatch -macro_file macro.h -parse_c test/testhead.c
> and neither if the exact same #define is present in the c file itself.
> 1) So this means that none of the #defines in the c files are read?
> 2) I didn't understand the difference between -macro_file and -macro_file_builtins
Could you try #define HEADER(head) MACROSTATMENT ? I think that is the
way to handle this sort of thing. You can see many examples in
If that doesn't help, I can look at it more this afternoon.
More information about the Cocci