diff --git a/async.cc b/async.cc index 89c3fccfb..6029abd66 100644 --- a/async.cc +++ b/async.cc @@ -23,12 +23,12 @@ # include "netlist.h" # include -bool NetAssign::is_asynchronous() +bool NetAssign::is_asynchronous() const { return true; } -bool NetCondit::is_asynchronous() +bool NetCondit::is_asynchronous() const { return false; } @@ -82,7 +82,7 @@ bool NetProc::is_asynchronous() return false; } -bool NetProcTop::is_asynchronous() +bool NetProcTop::is_asynchronous() const { if (type_ == IVL_PR_INITIAL) return false; diff --git a/lexor.lex b/lexor.lex index 54e6926eb..00e8dc96c 100644 --- a/lexor.lex +++ b/lexor.lex @@ -1288,6 +1288,7 @@ static void line_directive() if (cp == cpr) { VLerror(yylloc, "Invalid #line directive (missing space after " "file name)."); + delete[] buf; return; } cp = cpr; @@ -1296,6 +1297,7 @@ static void line_directive() unsigned long lineno = strtoul(cp, &cpr, 10); if (cp == cpr) { VLerror(yylloc, "Invalid line number for #line directive."); + delete[] buf; return; } cp = cpr; @@ -1305,6 +1307,7 @@ static void line_directive() if ((size_t)(cpr-yytext) != strlen(yytext)) { VLerror(yylloc, "Invalid #line directive (extra garbage after " "line number)."); + delete[] buf; return; } diff --git a/netlist.h b/netlist.h index 209460942..e93d5485d 100644 --- a/netlist.h +++ b/netlist.h @@ -2317,7 +2317,7 @@ class NetAssign : public NetAssignBase { explicit NetAssign(NetAssign_*lv, NetExpr*rv); ~NetAssign(); - bool is_asynchronous(); + bool is_asynchronous() const; virtual bool emit_proc(struct target_t*) const; virtual int match_proc(struct proc_match_t*); @@ -2496,7 +2496,7 @@ class NetCondit : public NetProc { virtual NexusSet* nex_input(bool rem_out = true); virtual void nex_output(NexusSet&o); - bool is_asynchronous(); + bool is_asynchronous() const; bool synth_async(Design*des, NetScope*scope, const NetBus&nex_map, NetBus&nex_out); @@ -3162,7 +3162,7 @@ class NetProcTop : public LineInfo, public Attrib { const NetScope*scope() const; /* Return true if this process represents combinational logic. */ - bool is_asynchronous(); + bool is_asynchronous() const; /* Create asynchronous logic from this thread and return true, or return false if that cannot be done. */