@rule2@
       identifier i;
       expression E1, E2;
       Type T;

type T, not Type t. Since it doesn't know Type, it assumes that i is an expression and Type is a typedef type.

julia

       @@


       -       T i = E1;
       +       T i;
               ...
       -       while( E2 )
       +       for (i=E1; E2; i++)
               {
                       ...
       -               i++;
               }


Running with only rule1 works fine on f1. With rule2 added I get an error:

Fatal error: exception Failure("minus: parse error:
= File "while2for.cocci", line 26, column 4,  charpos = 283
   around = 'i', whole content = -     T i = E1;
")

and I do not understand why coccinelle complains about syntax here.

BR Håkon Løvdal
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to