genvar in always_comb doesn't fail or lint warn during compile when not in a generate block
I think the language spec only allows for genvar variable usage in always_comb and assign when under a generate scope. I have example code such as below where I accidentally copied some code with a genvar still in it.
genvar g_foo; // top level module scope always_comb begin bar[g_foo] = stuff; end
This code will fail gcc compilation after verilator code generation but it won't fail or warn on verilog compile. Is there a way to add this check as a lint rule?
Also available in: Atom