[Cocci] Support for finding conditional preprocessor statements?

Julia Lawall julia.lawall at lip6.fr
Fri Mar 16 16:34:59 CET 2012



On Fri, 16 Mar 2012, SF Markus Elfring wrote:

> Hello!
>
> I have tried out the software package "coccinelle 1.0.0-16.1" on my openSUSE 
> 12.1 system.
>
>
> elfring at Sonne:~/Projekte/Coccinelle/Probe> SCRIPT='find_cpp.cocci' && cat 
> $SCRIPT && echo '------' && /usr/bin/spatch -version && /usr/bin/spatch 
> -sp_file $SCRIPT /usr/include/string.h -I /usr/include -recursive_includes
> @language_switch@
> @@
> *#ifdef __cplusplus
> ------
> spatch version 1.0.0-rc7 with Python support and with Str regexp support
> init_defs_builtins: /usr/share/coccinelle/standard.h
> File "find_cpp.cocci", line 3, column 1,  charpos = 22
>    around = '#ifdef __cplusplus', whole content = *#ifdef __cplusplus
> Fatal error: exception Lexer_cocci.Lexical("invalid in a non + context: 
> #ifdef __cplusplus")
>
>
> Would you like to improve the shown situation?

There are no plans to do so.

julia


More information about the Cocci mailing list