From 43a84d7ad80f215b96abbc3136dd6190fba502de Mon Sep 17 00:00:00 2001 From: HungMingWu Date: Sun, 27 Feb 2022 15:52:11 +0800 Subject: [PATCH] Internals: Fix VL_RESTORER behavior on passing a lvalue reference (#3326) Signed-off-by: HungMingWu --- src/V3Global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/V3Global.h b/src/V3Global.h index 40d102aee..685f84a8d 100644 --- a/src/V3Global.h +++ b/src/V3Global.h @@ -43,7 +43,7 @@ class V3HierBlockPlan; /// end-of-stope. // Object must be named, or it will not persist until end-of-scope. // Constructor needs () or GCC 4.8 false warning. -#define VL_RESTORER(var) const VRestorer restorer_##var(var); +#define VL_RESTORER(var) const VRestorer::type> restorer_##var(var); // Object used by VL_RESTORER. This object must be an auto variable, not // allocated on the heap or otherwise.