Why is this an issue?

Standalone generate blocks (begin / end pair) without a corresponding generate loop or condition were allowed in older Verilog standards but is no longer allowed in SystemVerilog.

How to fix it

Code examples

Noncompliant code example

module fly;
  begin : gen_block // Noncompliant
    int i = 1;
  end
endmodule