Allow variable initialization in any scope.
This is a SystemVerilog feature, so only allow it when compiling SystemVerilog files.
This commit is contained in:
parent
b0d61813b2
commit
5dbe688296
4
pform.cc
4
pform.cc
|
|
@ -1864,8 +1864,8 @@ void pform_make_pgassign_list(list<PExpr*>*alist,
|
||||||
void pform_make_reginit(const struct vlltype&li,
|
void pform_make_reginit(const struct vlltype&li,
|
||||||
perm_string name, PExpr*expr)
|
perm_string name, PExpr*expr)
|
||||||
{
|
{
|
||||||
if (! pform_at_module_level()) {
|
if (! pform_at_module_level() && !gn_system_verilog()) {
|
||||||
VLerror(li, "variable declaration assignments are only "
|
VLerror(li, "error: variable declaration assignments are only "
|
||||||
"allowed at the module level.");
|
"allowed at the module level.");
|
||||||
delete expr;
|
delete expr;
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue