Dear People,
I'm completely new here.
Attached is a small piece of .c and a .cocci file.
There is a "return 41;" in both files, commented out.
If I uncomment this "return 41;" in both files then
spatch will not match the pieces any more.
Could you please help me to undertand and circumvent this issue ?
Best Regards,
Robert Larice
// (compile "spatch --sp-file try-goto-2.cocci try-goto-2.c")
@trygoto@
identifier fn, Xp1, Xlabel;
@@
int fn (int Xp1)
{
if (Xp1 > 42) {
* goto Xlabel;
}
// the match fails if I uncomment this return statement
// in both the .c file and the .cocci file
// return 41;
Xlabel:
return 43;
}
int
foo(int n)
{
if (n > 42)
goto Lbaz;
// return 41;
Lbaz:
return 43;
}
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci