Hi,
Icarus Verilog appears not handling commented out `ifdef/`else/`endif properly, see examples below.
The bug still exists in the latest development verions.
$ iverilog -E test.v
test.v:7: warning: macro `endif undefined (and assumed null) at this point.
The output (a.out) incorrectly contains "*/"
// -------- file: test.v --------
`ifdef A
/*
`endif
*/
`endif
// -------- end of file: test.v --------
Logged In: YES
user_id=1651735
Originator: NO
This patch is for the development version, but it should be trivial to adapt it to also work with 0.8.5. The problem is/was that C style comment are not recognized/processed in a false/suppressed block. FYI new style comments (//) do work correctly.
File Added: 0001-Make-C-style-comments-work-in-false-suppressed-ifdef.patch
Patch file
Logged In: YES
user_id=1651735
Originator: NO
FYI this patch will also apply to the stable version with line offset warnings.
Logged In: YES
user_id=1651735
Originator: NO
The attached v0_8 patch will apply directly to the stable version (no warnings).
File Added: 0001-v0_8-make-C-style-comments-work-in-false-suppressed.patch
V0_8 patch file