Hello,
in Wine it is common to comment out code with #if 0. I do know that this
is an advantage of coccinelle to ignore conditional compilation and thus
find bugs in code that gets exercised only on odd architectures. But
with #if 0 the code might not be even valid C:
#if 0
float4 cTest::test(float2 vec)
{
}
#endif
spatch -parse_c /tmp/if-0.c
PARSING: /tmp/if-0.c
Fatal error: exception Failure("lexical error ~ and :: not allowed in C
identifiers, try -c++ option
=File "/tmp/if-0.c", line 2, column 7, charpos = 13
around = 'cTest::test', whole content = float4 cTest::test(float2 vec)")
Can coccinelle catch parse errors in #if 0'ed code, warn about it and
fall back to treat it as a comment and go on with the parsing?
thanks
bye
michael
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)