Sorry. That was a typo. I created test.cocci in a hurry to send it to you.
What I was actually trying to do is something like this
@@
type t;
@@
t getfoo() {
...
}
+//SEDREP bool localfunc( int *lo, int *hi, int *map)
+{
+ int np = foo(lo, hi, map);
+ return np;
+}
where the function returns bool. Since bool is not in C
I comment out the declaration part and later run it through SED
to remove the //SEDREP part.
I think commenting out the declaration part is causing the problem.
Thanks
Ajay
On Fri, Aug 19, 2011 at 10:09 AM, Julia Lawall <[email protected]> wrote:
> On Fri, 19 Aug 2011, Ajay Panyala wrote:
>
> > Please see test.c and test.cocci (files attached)
> > I am using version rc4. I get
> >
> > spatch -sp_file test.cocci test.c -o testNew.c
> > init_defs_builtins: /opt/tools/coccinelle/share/coccinelle/standard.h
> > Fatal error: exception Failure("incompatible minus and plus code starting
> on
> > lines 6 and 6")
>
> Your .cocci file has a ; at the end of the parameter list.
>
> julia
>
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)