Fix `free` collision (#6675)
This commit is contained in:
parent
8e35c81399
commit
34f63396cb
|
|
@ -253,7 +253,7 @@ class EmitCImp final : public EmitCFunc {
|
||||||
} else {
|
} else {
|
||||||
putns(modp, "void " + modName + "::dtor() {\n");
|
putns(modp, "void " + modName + "::dtor() {\n");
|
||||||
}
|
}
|
||||||
putns(modp, "VL_DO_DANGLING(free(const_cast<char*>(vlNamep)), vlNamep);\n");
|
putns(modp, "VL_DO_DANGLING(std::free(const_cast<char*>(vlNamep)), vlNamep);\n");
|
||||||
emitSystemCSection(modp, VSystemCSectionType::DTOR);
|
emitSystemCSection(modp, VSystemCSectionType::DTOR);
|
||||||
puts("}\n");
|
puts("}\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ module t (/*AUTOARG*/
|
||||||
|
|
||||||
reg vector; // OK, as not public
|
reg vector; // OK, as not public
|
||||||
reg switch /*verilator public*/; // Bad
|
reg switch /*verilator public*/; // Bad
|
||||||
|
reg free /*verilator public*/; // OK, not actually a keyword
|
||||||
|
|
||||||
initial begin
|
initial begin
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue