On Tue, 15 Oct 2019, Markus Elfring wrote:

> >> * Fix search for parameterised macros with SmPL
> >>   https://github.com/coccinelle/coccinelle/issues/94
> …
> > There are no #defines in his semantic patch.
>
> This design detail can probably be taken also better into account
> if other software development challenges will finally be solved.
>
> elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-c 
> Jürgen_Groß-Beispiel1.c
> …
> (ONCE) LEXER:unrecognised symbol, in token rule:\
> LEXER: WIERD end of file in string
> PB: not found closing paren in fuzzy parsing
> …
> BAD:!!!!! #define MACRO(name)    snprintf(pg, PAGE_SIZE, %u\n", ptr->name)

If a " is missing then the code can't be parsed and Coccinelle won't do
anything.  But I don't know if this was a bug in the original code or
something you have modified; you sent another message that did not have
this problem.

> https://wiki.sei.cmu.edu/confluence/display/c/PRE11-C.+Do+not+conclude+macro+definitions+with+a+semicolon
> https://gcc.gnu.org/onlinedocs/cpp/Swallowing-the-Semicolon.html
>
> How will the software situation be improved further?

What software situation?

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to