On Fri, May 24, 2019 at 2:13 PM Timur Tabi <[email protected]> wrote:

> void myfunc(int x)
> {
>     goto myfunc_exit;
> }
>
> My problem is that cocci takes "func_exit" literally.  I tried
> func##_exit, but that didn't work.  How do I make this work?

I figured it out:

@@
identifier func;
fresh identifier label = func ## "_exit";
@@
func(...) {
<+...
+    goto label;
...+>
}
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to