it's great for the used/unused labels.

It won't work for this:

void a(int i){
if (i) got out;
printf("hi\n");
out:
}

the out:
}

is not legal, for reasons I don't agree with, but ...
a.c:4:1: error: label at end of compound statement

one way to fix it:
out:
return;
}

but it's not really right:

void a(int i){
if (i) {goto out; bad:}
printf("hi\n");
out:
return;
}
line 2 will get an error.

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

Reply via email to