Hi,

Le vendredi 17 décembre 2010 à 22:45 +0100, Julia Lawall a écrit :
> > OK, it does the trick ! Is there a plan to fix this issue in a more
> > straightforward way ?
> 
> Probably not.  The code for figuring out where to attach the + code is a 
> bit subtle.  Also, in your case it seems a bit strange to require that the 
> int declaration comes right before the first statement.

I may have miss something in the provided example which was based on of
your proposal. My only point is to be able to treat independantly of its
position the expression:
        Packet p1, p2;
like
        Packet p1;
        Packet p2;
because the two are syntaxically equivalent.

The transformation I want to do is the following:
- Packet p;
+ Packet *p = EXPRESSION
OTHER DECLARATION
+ if (p == NULL) then exit;
...
+ free(p)
return ...;

>   On the other 
> hand, the error message could be made more helpful.

It is ok for "me". When I encounter it the first time, I really
understood what was going on.

BR,
-- 
Eric Leblond <[email protected]>
NuFW, Now User Filtering Works : http://www.nufw.org

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to