On Mon, Feb 18, 2019 at 10:56 PM Julia Lawall <[email protected]> wrote: > > > > On Mon, 18 Feb 2019, thomas pedersen wrote: > > > Hello, > > > > I'm trying to write an SmPL patch which will modify C macro. The test files > > are: > > > > # test_macro.c > > #define MYMACRO(adsf) { \ > > .foo = (asdf),\ > > } > > > > # test_macro.cocci > > @@ > > expression E; > > @@ > > > > { > > .foo = E > > + * 1000 > > } > > > > Running with: > > $ spatch --debug --sp-file test_macro.cocci test_macro.c > > > > Gives the output: > > Unsupported form of #define: File "test_macro.c", line 1 > > > > What's the correct syntax to match against a similar macro? > > It was the macro definition itself that was not supported. The problem > should be fixed now. You can get the latest version from Github.
It works! Thanks. thomas _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
