I have lots of code that looks like this:

#define MY_ITERATOR(x, y)  for (x=0; x<y; x++)

MY_ITERATOR(v, 20)
{
    printf("%i\n", v);
}

Spatch chokes on this because it thinks MY_ITERATOR() should end with
a semicolon:

...
bad:          MY_ITERATOR(v, 20)
BAD:!!!!!     {
bad:               printf("%i\n", v);
...

I tried specifying "--undefined MY_ITERATOR", but that did nothing.
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to