Hi,

I'm running into some [old] code using K&R C function definition:

void
rtalloc(ro)
register struct route *ro;
{
... function body ...
}

Which is making spatch fails with:

bad: void
BAD:!!!!! rtalloc(ro)
ERROR-RECOV: found sync '}' at line 56
parsing pass2: try again
ERROR-RECOV: found sync '}' at line 56
parse error
 = File "rt.c", line 27, column 0,  charpos = 501
    around = '{', whole content = {
badcount: 30
bad: register struct route *ro;
BAD:!!!!! {
[...]
SEMANTIC:parameter name omitted, but I continue
TYPEDEF CONFLICT:prt
TODO:typedef now used as an identifier


While the Graal would be to have spatch be capable to convert K&R to
ANSI C, would it be feasible to teach it not to fail on such
declaration ?

Thanks in advance,
 - Arnaud

ps: in general, where should parse error be sent ? here ? the webpage
does not precise much in the "Contacts" page.
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to