diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim index bb9d30b8fc..a9a4917476 100644 --- a/compiler/ccgstmts.nim +++ b/compiler/ccgstmts.nim @@ -981,7 +981,7 @@ proc genTryCpp(p: BProc, t: PNode, d: var TLoc) = inc(p.labels, 2) let etmp = p.labels - lineCg(p, cpsStmts, "std::exception_ptr T$1_ = nullptr;", [etmp]) + p.procSec(cpsInit).add(ropecg(p.module, "\tstd::exception_ptr T$1_ = nullptr;", [etmp])) let fin = if t[^1].kind == nkFinally: t[^1] else: nil p.nestedTryStmts.add((fin, false, 0.Natural))