> In any case, what you want is
>
> identifier i;
>
> and then struct i structure_var = { ... .element = allocation(...) ... };
Thanks for your hint.
@show_designated_initialisers@
field element;
identifier allocation, structure_type, structure_var;
@@
<+...
*struct structure_type structure_var = { ... .element = allocation(...) ... };
...+>
elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch.opt -sp-file
show_designated_initialisers1.cocci unchecked_return_values1.c
init_defs_builtins: /usr/local/lib/coccinelle/standard.h
155 156
Fatal error: exception Failure("minus: parse error: \n = File
\"show_designated_initialisers1.cocci\", line 6, column 45, charpos = 155\n
around = '.', whole content = *struct structure_type structure_var = { ...
.element = allocation(...) ... };\n")
How should my small SmPL example be improved further?
http://en.cppreference.com/w/c/language/struct_initialization
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci